RU beehive logo ITEC dept promo banner
ITEC 325
2015fall
ibarland

homelectsexamshws
D2Lbreeze (snow day)

intro
intro: web requests and responses

So:

upshot: So, the essence of the situation is that the server and browser are functions with the type-signatures:
server: stringurl → stringhtml
browser: stringhtml → void.

        Client                             Server

        Browser            ->request->
                            (URL)
                                           WebServer (Apache)
                                             - look up file:
                                             - possibly redirect...
                                             - what if file exists, but no permissions?
                                             - what if file doesn't exist?
                                             - what if URL is a directory?
                                             - what if request from a mobile platform?
                                             - process any php (as configured)
                                               which may invoke other programs, db connections, etc
                            <-response<-
                            (html, jpg,
                             html+javascript,
                             ...)
        
       Browser
        ...makes a gui window,
           lays out text/color/pictures
           Displays response
        Also:
        ...makes add'l URL requests... [Ad blocker!]
        ...runs javascript...
        ...invokes plug-ins or passes to OS...

A couple of choices made by web servers we care about:


Looking more closely

For this class, you'll need a browser with good debug-tools built in. For Firefox, there is an extension “Firebug”; I'll demo a couple of Chrome's built-in tools. We will not worry about supporting old browers (e.g. old versions of IE).

≡ » More Tools » Developer Tools
We'll look briefly at the "Elements" tab, but today we're mostly concerned with the "Network" tab, and clicking on particular files. In particular, viewing the Request Headers and Response Headers.

Btw, here are the official HTTP response codes, or the cat-picture version.

the real upshot: So, the essence of the situation is actually that the server and browser are functions with the type-signatures:
server: http-request-packet → http-response-packet (where the first packet contains the URL, and the second packet contains the html response);
browser: http-response-packet → void.

Further things to mention (if not today, then perhaps later:)

homelectsexamshws
D2Lbreeze (snow day)


©2015, Ian Barland, Radford University
Last modified 2015.Sep.02 (Wed)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.