[ Pobierz całość w formacie PDF ]
.Therefore, within this time the message can be used without referring tothe server.Consider that this time is exceeded and there is a need for that response message.The data inside the message might have been changed or not after the expirationdate.To be able to ensure whether the data is changed or not, a validationmechanism is defined as follows:Expiration MechanismIn order to decide whether the data is fresh or not, an expiration time shouldbe determined.In most cases, the origin server explicitly defines theexpiration time for a particular response message within that message.If thisis the case, the cached data can be used to send from cache for subsequentrequests within the expiration time.If the origin server did not define any expiration time, there are some methodsto estimate/calculate a reasonable expiration time (such as the Last-Modifiedtime).Since this is not originated from the server, they should be usedcautiously.Chapter 8.Internet Protocols and Applications 447Validation MechanismWhen the expiration time is exceeded, there is a possibility that the data isstale.In order to ensure the validation of the response message, the cachehas to check with the origin server (or possibly an intermediate cache with afresh response) whether the response message is still usable.HTTP 1.1provides conditional methods for this purpose.When an origin server sends a full response, it attaches some sort of validatorto the message.This will then be used as a cache validator by the useragent or the proxy cache.The client (user agent or the proxy cache)generates a conditional request with a cache validator attached to it.Theserver then evaluates the message and responds with a special code(usually, 304 (Not Modified)) and no entity body.Otherwise, the server sendsthe full response (including the entity body).This approach avoids an extraround-trip if the validator does not match and also avoids sending the fullresponse if the validator matches.Please refer to RFC 2068 for more details about HTTP caching.8.3 Hypertext Markup Language (HTML)HTML is one of the major attractions of the Web.It has an architected set of tagsthat should be understood by all Web browsers and Web servers, although as newfeatures are added to HTML, they may not be supported by older Web browsers.These tags are device independent.The same document can be sent from apersonal computer, an AIX or UNIX machine, or a mainframe, and the Webbrowser on any client machine can understand the HTML tags and build the datastream to display it on the target device.HTML tags describe basic elements of aWeb document, such as headers, paragraphs, text styles, and lists.There are alsomore sophisticated tags to create tables and to include interactive elements, suchas forms, scripts or Java applets.Once document writers and programmers have mastered HTML, those skills areapplicable to any operating system on any machine, provided that it has a Webbrowser.Since HTML supports hypertext, it allows document writers to include links to otherHTML documents.Those documents might be on the same machine as theoriginal, or they might be on a machine on another network on the other side of theworld; such is the power of HTML links.8.4 The Extensible Markup Language (XML)The Extensible Markup Language (XML) describes a class of data objects calledXML documents which are stored on computers, and partially describes thebehavior of programs that process these objects.XML is an application profile orrestricted form of SGML.The goal of XML is to enable generic SGML to beserved, received, and processed on the Web in the way that is now possible withHTML.XML has been designed for ease of implementation and for interoperabilitywith both SGML and HTML.448 TCP/IP Tutorial and Technical Overview8.5 JavaJava is an important new technology in the world of the Internet.In Java summary,it is a simple, robust, object-oriented, platform-independent, multithreaded, dynamicgeneral-purpose programming environment for creating applications for the Internetand intranet.8.5.1 Java Components OverviewJava itself is a programming language, developed by Sun Microsystems.It isobject-oriented, and was designed to be a close cousin of C and C++, but easier toprogram, more portable and more robust.The authors have done an excellent jobof removing the features in C++ that give programmers sleepless nights, yetretaining good functionality
[ Pobierz całość w formacie PDF ]