CSCI571 Final Fall2021
CSCI571 Final Fall2021
Attempt 1
Question 1 2 / 2 points
[2 Points] A drawback of the eval() function is its vulnerability.
True
False
Question 2 2 / 2 points
[2 Points] Select all statements that are TRUE of the <!DOCTYPE> declaration. Select all that
apply.
<!DOCTYPE html>
The <!DOCTYPE> declaration represents the document type, and helps browsers to
display web pages correctly
Question 3 2 / 2 points
<!DOCTYPE html>
<html>
<body>
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 1/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
<script>
function myFunction() {
document.querySelector(".example").style.backgroundColor = "red";
}
</script>
</body>
</html>
Adds red background color to the heading with text A heading with class="example"
Adds red background color to the paragraph with text A paragraph with class="example".
Adds red background color to both the header and the paragraph
Question 4 2 / 2 points
[2 Points] HTTP Strict-Transport-Security (HSTS) is a security feature that disallows insecure
communication.
True
False
Question 5 2 / 2 points
[2 Points] CSS describes how HTML elements are to be displayed on screen, paper, or in other
media.
a) True
b) False
Question 6 2 / 2 points
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 2/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
>>> word[-2]
'n'
'y'
'o'
Question 7 2 / 2 points
[2 Points] Select all statements that are true of JavaScript variables and identifiers. Select all that
apply.
Identifiers can be short names (like x and y) or more descriptive names (age, sum,
totalVolume)
REST Questions
Question 8 2 / 2 points
[2 Points] What is the purpose of URLs in REST design patterns. Select one answer.
Serverless Questions
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 3/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
Question 9 2 / 2 points
[2 points] Which of the following are properties of a container like Docker? Select all that apply.
Not portable
Question 10 2 / 2 points
[2 points] Select the components of a Microservice. Select all that apply.
a data store
a FaaS
a Container
a REST endpoint
Question 12 2 / 2 points
[2 points] Which of the following are properties of a container like Docker? Select all that apply.
Package an application with all its dependencies into a standardized unit for software
development
Independent of VM
Lightweight
HTML5 Questions
Question 13 2 / 2 points
[2 points] Which of the following are new elements in HTML5. Select all that apply.
aside
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 4/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
applet
article
header
column
Question 14 2 / 2 points
[2 points] Which of the following attributes are not supported in HTML5? Select all that apply.
controls
align
bgcolor
colspan
border
Question 15 2 / 2 points
<!DOCTYPE html>
<html>
<body>
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillRect(20, 20, 150, 100);
</script>
</body>
</html>
Question 16 2 / 2 points
Question 17 2 / 2 points
[2 points] Cookies include a number of components, some required, some optional. What are the
two (2) required components? Select only those two.
Domain
HttpOnly flag
Secure flag
Expiration date
[2 Points} Select all valid attributes of cookies. Select all that apply.
HttpOnly
SameSite
Expires
Path
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 6/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
SameParty
Max-age
Last Accessed
Secure
Ajax Questions
Question 19 2 / 2 points
[2 points] Fonts on a web page may be requested across domains using CORS.
True
False
Question 20 2 / 2 points
[2 points] The web browser displays a visual progress indicator while the XMLHttpRequest is
being processed.
True
False
Question 21 2 / 2 points
True
False
Question 22 2 / 2 points
[2 points] Select which XMLHttpRequest method actually triggers the request to the server?
open()
send()
Question 23 2 / 2 points
[2 points] Consider the following code snippet:
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 7/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
j = eval("(" + text + ")");
It is part of JSON.parse()
It is very unsafe
Which values should be checked in the callback? Select all that apply.
xhr.status is 404
xhr.statusText is OK
xhr.readyState is 4
Question 26 2 / 2 points
[2 points] Consider the following code from one of the Ajax example shown in class:
window.onload = initAll;
var xhr = false;
function initAll() { same as previously except it calls getPix }
function getPix() { xhr.open("GET", "flickrfeed.xml", true);
xhr.onreadystatechange = XXXXX1;
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 8/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
xhr.send(null);setTimeout("getPix()",5 * 1000); }
function showPictures() {
var tempDiv = document.createElement("div");
var tempDiv2 = document.createElement("div");
if (xhr.readyState == 4) {
if (xhr.status == 200) {
tempDiv.XXXXX2 = xhr.responseText;
var allLinks = tempDiv.getElementsByTagName("a");
for (var i=1; i<allLinks.length; i+=2) {
tempDiv2.appendChild(allLinks[i].cloneNode(true)); }
allLinks = tempDiv2.getElementsByTagName("a");
var randomImg = Math.floor(Math.random() * allLinks.length);
document.getElementById("pictureBar").innerHTML =
allLinks[randomImg].innerHTML;
} else { alert("There was a problem with the request " +
xhr.status); } } }
What should be the values of the two items listed as XXXXX1 and XXXXX2?
Frameworks Questions
Question 27 2 / 2 points
[2 points] Select which of the following is NOT true of NodeJS.
is event driven
handles networking
Question 28 2 / 2 points
[2 points] Which of the following are true of TypeScript? Select all that apply.
Supports Optionals
Supports MVC
Question 29 2 / 2 points
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 9/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
app.listen(80, function () {
console.log('CORS-enabled web server listening on port 80')
});
app.use(cors());
app.send(cors());
cors.use(cors());
app.load(cors());
Question 30 2 / 2 points
[2 points] Select which of the following are true of Angular (version 8+). Select all that apply.
Question 31 2 / 2 points
[2 points] Select which of the following is true of React. Select all that apply.
Question 32 2 / 2 points
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 10/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
[2 points] Which types of hacks can cause damage to the user on the client side? Select all that
apply.
Denial of Service
Stealing cookies
Cross-site Spoofing
Cross-site Scripting
JavaScript Hijacking
SQL Injection
Content Spoofing
Search Worms
DDoS attack
Question 35 2 / 2 points
[2 points] Which of the following are authentication attacks?
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 11/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
Insufficient Authentication
Content Spoofing
Question 36 2 / 2 points
a) True
b) False
Question 37 2 / 2 points
[2 points] Select the types of files should be compressed to improve web site performance.
Select all that apply.
JSONP files
PDF files
XML files
JPG files
Text files
Question 38 2 / 2 points
[2 points] Select all conditions where a “cached object” is fresh.
A proxy cache has seen the object recently, and it was modified long ago
If browser cache has seen the object recently, and has been set to check once per
session
The origin server is asked to validate the object
Question 39 2 / 2 points
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 12/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
[2 points] Which of the following are ways to reduce the number of HTTP requests? Select all
that apply.
Combine cookies
Split images
Combine scripts
JQuery Questions
Question 40 2 / 2 points
[2 points] jQuery has fairly complex ajax support functions.
True
False
Question 41 2 / 2 points
[2 points] Which of the following objects are abstracted by jQuery? Select all that apply.
XMLHttpRequest
JSON
DOM
Question 42 2 / 2 points
[2 points] What type of selector is the ‘contains’ selector, as in the following example:
:multiple selector
:first
Question 44 2 / 2 points
[2 points] What type of selector is the ‘header’ selector, as in the following example:
Basic selector
Question 45 2 / 2 points
[2 points] What type of selector is the ‘:contains()’ selector, as in the following example:
Question 46 1 / 2 points
[2 points] Select RWD usability guidelines on mobile devices.
change navigation
Question 47 2 / 2 points
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 14/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
[2 points] Consider the following media queries:
What different device sizes they fail to support? Select all that apply.
Question 48 2 / 2 points
[4 points] Select which concepts are the basis of Responsive Website Design. Select all that
apply.
content reduction
fluid grids
flexible images
Question 49 2 / 2 points
[2 points] What are properties of fluid grids? Select all that apply.
Elements will adjust their widths and heights by the specified proportions to their parent
container
Question 50 2 / 2 points
[2 Points] The major difference between different versions of Bootstrap is the number of grid
tiers.
a) True
b) False
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 15/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
Done
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 16/16