Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook

(Nora) #1

314 CHAPTER 7 Working with forms


The web browser
The web browser provides a platform-independent means of displaying webpages that were
written with HTML. HTML was designed to render within any operating system while placing
no constraint on the window size. HTML was designed to flow, wrapping text as necessary to
fit in the browser window. The web browser also displays images and responds to hyperlinks.
When a webpage request is sent to the web server, the result is displayed in the web browser
by clearing the browser screen and displaying the new webpage.
Although the web browser’s role is just to present data and collect data, new client-side
technologies are emerging every day that enable web browsers to be more robust, so it’s
simpler to develop a webpage while improving the user’s experience. Technologies such as
Asynchronous JavaScript and XML (AJAX) enable the web browsers to talk to the web servers
without clearing the existing webpages from the browser window.

Understanding HTTP protocol basics
HTTP (Hypertext Transfer Protocol) is the protocol of the web. HTTP protocol is a text-based
protocol, so text commands are sent to the server. By using a network sniffer program, you
can see the commands sent and the responses received. Microsoft Internet Explorer has a
built-in network sniffer that is part of the developer tools and that you can access by pressing
the F12 function key, which displays the developer tools window. Figure 7-3 shows the devel-
oper tools window after capturing some network traffic.

FIGURE 7-3 he developer tools window showing network trafficT

This window displays all the traffic when navigating to a website and has the following
columns.
■■URL The address of the resource being accessed, which might be a relative address
or an absolute address
■■Method The HTTP command being sent to the server
■■Result A numeric result code
■■Type The MIME (Multipurpose Internet Mail Extensions) type of the resource being
accessed
Free download pdf