When a web user (a person) clicks on a link, what happens first? (pick
one)
The browser contacts the appropriate server
The server tells the browser what page to load
The operating system offers a web page to the client
All dogs go to heaven
Why do web browser keep a cache (pick all that apply)
To speed access to commonly used pages
To reduce network load
To store information about the user's dog.
To reduce server load
To record what pages a particular user has accessed
Sometimes clients will verify a cached page with the server before using
the cached page. Why?
________________________________________________________________________________
________________________________________________________________________________
Suppose a client can access a cached page in 20 milliseconds. The
same client can download a page over the network in 100 milliseconds.
It takes another 100 milliseconds to display a page, regardless of source.
The cache hit rate is 50%. How long on average does it take to show
a page.
__________________________________________________________________________________
__________________________________________________________________________________
HTTP Stuff (3 points)
What is transferred in the header of an HTTP request? (pick all that
apply)
The content type
The file name
The length
The author's dogs name
What is the big advantage of HTTP/1.1 over HTTP/1.0 (pick one)
The correctness of the data is verified, reducing errors.
Encryption protects all data transferred.
Caching is allowed.
More than one request can be sent over a connection.
Suppose a file has 1000 bytes. How much network traffic is generated
when sending the file? (choose all the apply)
Less than 1000 bytes if HTTP/1.1's compression is used
More than 1000 bytes; there's a header you know
Exactly 1000 bytes. HTTP is designed to be optimal in data transmission
terms.
Dogs love bacon
Depends on the latency of the underlying network. Fast networks use
less than 1000 bytes, but slow networks need more.
HTML Stuff (9 points)
Suppose you have large section of text, all of which has spaces that need
to be preserved, and is already formatted perfectly. What tag should
you use to preserve the existing format for this text? ________________________________
(3 points) Write me a correct web page that displays you name in the middle
of the screen, and as a title on the window's title bar.
(True/False) A physical format describes what text looks like, and a logical
format describes the content of the text.
The difference between a check box and a radio button is(pick all that
apply)
More than one check box can be set at a time, no two radio buttons of the
same name can be set at once.
Radio buttons are normally displayed horizontally, check boxed vertically
Dogs love trucks
Radio buttons can be partially set, check boxes are either on or off.
Check boxes are a logical format, radio buttons are a physical format
(3 points) Write me a correct web page that
Asks for a user's dog's life history
Has a text area of ten lines with that are 80 wide each
Sends the contents of the text area to a script at http://euclid.nmu.edu/cgi-bin/logger
Perl Stuff (11 points)
(True/False) Variables that start with a '$' are strings, and '%' means
numbers
(3 points) Write a some code that prints out the contents of the normal
array 'fred'. There are ten elements numbered 0 ... 9
Which will be faster at finding an element of an associative array given
it's key value?
An array tied to a hash table file
An array tied to a normal text file
An array tied to the tail of a dog
(3 points) A form sends data to a cgi script. The script prints
the value of a text area named 'dog'. Write that script.
(3 points) Write a perl script that looks in a file as shown below and
prints ou the age of the dog named 'fido'.
Snoopy,
Charley Brown,
10
Woody,
Chris Christophseron, 3
Haggared,
Charles Manson,
12
Killer,
Charles Barkley,
5