Computer Science 571 2nd Exam Prof. , April 28, 2015, 5:30pm – 6:50pm
Name: Student ID Number:
1. This is a closed book exam.
2. Please answer all questions on the test
Copyright By PowCoder代写 加微信 powcoder
Security and Privacy Questions [10 pts]
Each question is worth 2 points.
Q1: What is a recent technique to construct highly secure passwords?
A1: create long passphrases using Diceware, based on rolling a dice and looking up 7,000+ words
Q2: What functionality do PGP and S/MIME provide? A2: Encryption and signing of e-mail messages
Q3: What is the main functionality of TOR?
A3: TOR is a network that provides an anonymous path between a client
(browser) and a server (web site)
Q4: Why are browser plugins inherently insecure?
A4: Because they bypass the browser sandbox, and can execute arbitrary
malicious code
Q5: Is it possible to send a virus in a cookie? A5: YES [ ] No [X]
Hi-Performance Web Questions [10 pts]
Each question is worth 2 points.
Q1. What percentage of the end-user response time is spent in the front-end?
Q2. What are 2 ways that reduce the number of HTTP requests?
Combine scripts
Combine Style Sheets
Use image maps
Use CSS Sprites
Q3. What 5 components can be GZIP-ed?
HTML, CSS, JavaScript, JSON, XML
Q4. What 2 components should not be GZIP-ed?
Images and PDF
Q5. Where should CSS and scripts be placed in a HTML file? CSS at top, scripts at bottom
HTML5 Questions [10 pts] Each question is worth 2 points.
Q1: The use of the
A1: Any 2 of header, footer, section, article, nav, aside
Q2: Which of the following capabilities are included in HTML5?
[ ] drag file in browser
[ ] interactive canvas gradient [ ] editable content
[ ] geolocation
[ ] drag and drop
[ ] storage
[X] ALL OF THE ABOVE
[You must choose the correct choice or choices. There is no partial credit]
Q3: What is the purpose of the different “profiles” included in the H. 264 video standard?
A3: each profile defines a set of optional features that trade complexity for file size.
Q4: What is the meaning of the “preload” video attribute?
A4: specifies that the video will be loaded at page load and ready to run.
Q5: If you were asked to make sure that your video files could be viewed on the large majority of browsers, what two video containers would you select?
A5: MPEG4 and WebM
JSON/AJAX Questions [20 pts]
Each question is worth 2 points.
Q1: Which of the following calls to send() is invalid? Circle your answer. a. send()
b. send(null)
c. send(“x=1&y=2”)
Q2: What is the major difference in behavior between client and server in an AJAX transaction?
AJAX transactions are asynchronous
Q3: What are the 4 basic technologies in AJAX?
HTML, CSS, JavaScript, and XML (or JSON)
Q4: Which readyState and Status combination should you check for to know that an AJAX request is complete? Circle your answer.
a. 3 and 304
b. 2 and 200
c. 4 and 200
d. 5 and 404
Q5: List 3 properties of JSON
– Subset of ECMA-232 Third Edition – Language independent
– text-based
– light-weight
– Easy to parse
– Not a document format
– Not a markup language
– Not a serialization format
Q6. What is a possible drawback of the eval ()function?
The eval() technique is subject to security vulnerabilities
Q7. What is the first index in a JSON array?
JSON does not talk about indexing: can be 0 or 1
Q8. JSON Parsers (True / False)
A JSON encoder must only produce well-formed JSON text [X]True [ ]False
Q9. What is JSONP?
“JSON with padding” is a JSON extension wherein the name of a callback function is specified as an input argument of the call itself.
Q10. What are the responsibilities of an “AJAX engine”?
“render” the user interface, interact with the user, communicate asynchronously with the server.
JavaScript and Ajax Questions [10 pts]
Below is the HTML source code that produces the web page above. There are 4 links. When the user cursor is placed over each link, a pop-up widget is displayed viewing the contents of the Web page being hyperlinked.
Gentle Introduction to JavaScript