Previous Table of Contents Next


Multipurpose Internet Mail Extensions (MIME)

MIME is part of HTTP, and is a standard that allows various forms of data, such as video, sound, executables and other binary files, to be sent across the network as they are, without having to perform any file conversion. Internet servers and email clients use MIME to attach various file types to email messages. HTML can use MIME to embed multimedia in files that are requested by clients.

Some file types require special software to be properly incorporated in the client browser. These “plug-ins” can be added to the client’s browser on an as-needed basis to run streaming video, play sound files, or read complex document formats. Using MIME, Web servers can communicate with clients to recognize if a plug-in is present or not, download files as appropriate, or inform a user that a plug-in needs to be downloaded.

Software developers can use MIME to incorporate multimedia or various file formats in their Web applications.

Cookies

HTTP is inherently stateless. In other words, as each request is made and answered, the client and server terminate their mutual connection. There is not a persistent recognition that spans multiple requests. While this is not a problem for simple file delivery, which is what HTTP was originally intended to support, it is a big problem for applications running through the gateway that need to maintain some sort of continuity among several transactions. For example, you cannot have a client log in and be validated for a series of transactions unless you can recognize that client’s individual transactions among all the various incoming requests coming from across the network.

Cookies were created to address this problem. A cookie is a tiny file, often just a long number but sometimes with some brief keywords or other text strings, that the server temporarily stores on the client through the browser. The server often makes a note somewhere of who it gave the cookie to and why. Then later, when the next request comes in from that client, the server can see the cookie, compare the cookie number or codes with its internal notes, and confirm that yes, this is the user who already logged on and is validated.

Cookies are used when you shop on the Net and put things in your “shopping cart” before going to the “check out” stand. And they’re used by applications where a client needs to go through a series of transactions before deciding to either save their work or abandon what they’ve done.

Cookies can be given time limits, so that they expire at a certain time. They can also be associated with the server that sent them, so that a client that gets cookies from a second server doesn’t mix up its cookies from the first server.

Hypertext Markup Language (HTML)

HTML is the language of Web browsers. In order to understand how to deploy applications across the Web, you must understand HTML. Fortunately, it’s relatively easy to get productive with HTML.

HTML is a subset of the Standard Generalized Markup Language (SGML), a standard for providing a generic structure documents so they can be displayed in a reasonably similar manner on any platform. HTML consists primarily of language tags, brief commands that tell a Web browser (such as Netscape Navigator) how to format text, graphics, and other information. The tags themselves do not appear in the final display, but their results do.

For example, the following text tells a browser to display one word in a sentence in bold print:


Print one of the words in this sentence in <B>bold</B> print.

This sentence, when included in an HTML file, would display in a browser like this:


     Print one of the words in this sentence in bold print.

Table 27.1 shows a few examples of HTML tags.

Table 27.1. HTML tag examples.

This Text with
Embedded HTML Tags
Results in This Output:
Explanation

Original HTML: Hello!<BR> I’m Dr. Van Nostrand.
Browser Display: Hello!
I’m Dr. Van Nostrand.
Explanation: <BR> is the single tag for a carriage return. Browsers ignore actual carriage returns; you must use tags. A period is automatically followed by two spaces, even if it’s after Dr.
Original HTML: <I>Oracle8 Unleashed</I>
Browser Display: Oracle8 Unleashed
Explanation: <I> is a tag pair. All text between the <I> and the </I> is in italics.
Original HTML: <B><I>Oracle8 Unleashed</B>, edited by Rosemarie Graham</I>
Browser Display: Oracle8 Unleashed, edited by Rosemarie Graham
Explanation: Tags can overlap and be combined.

The point of HTML is to allow files to be delivered to any platform without requiring that platform to have any special software other than the Web browser. For example, consider Figure 27.1, which is the text of a newspaper article.


Figure 27.1.  An example newspaper article.


Previous Table of Contents Next
Используются технологии uCoz