Shamash:
The
Jewish
Network Your CGI can set the cookie on the client side with the command: Set-Cookie: NAME=VALUE; expires=DATE; path=PATH; domain=DOMAIN_NAME; secure
The next time the browser (IF it is cookie-capable) goes to the PATH, it will send (all) the NAME=VALUE which are specified for that PATH. It does it in this format: Cookie: NAME=VALUE
This then allows your CGI to strip the cookie pairs off and perform the script on the results.
Therefore, you can create a unique number for every client and store that number along with preferences in a database. The client's browser stores that number with a cookie. Then, when the customer asks for his/her "personal" page, you grab the cookie, look up the number, and send back his/her "personal" page based upon the preferences for that unique key.
Cookies are mostly used by online shopping malls for a shopping cart. However, since cookies are not universal, it is necessary to fall back on the IP address and user_agent headers to identify browsers which do not support cookies.
Browsers that Support Cookies:
These browsers have gotten good cookies:
<HEAD><META HTTP-EQUIV=3D"REFRESH" CONTENT=3D2><TITLE></TITLE></HEAD>
The next example tells the browser to reload in 5 seconds. If a URL is specified, the browser will load the URL after the time specified has elapsed. If no URL is specified, it will reload the current document.
<HEAD><META HTTP-EQUIV=3D"REFRESH" CONTENT=3D"5; URL=3Dhttp://www.sample.com/next.htm"><TITLE></TITLE></HEAD>
This line tells the browser that the information on the page expires on the at the exact time the page is delivered from the server, assuming that the server is in the GMT (+0000) time zone. However, it is dependent upon the clock setting of the browsers computer and the time set on the server, so a better method would be to give a really old date - maybe a month ago;
When I tested this with Netscape 2.0b5 and MSIE 2.0, using the back button on the browser resulted in the page being reloaded from the server.
Changing the URL for the same CGI by adding a question mark to the end (assuming that you do not already have a QueryString attached). However, this does not force the browser the reload a page from the server - I used it so that the browser could tell the difference between the results of GET and POST requests to my Search CGI.
If you need to ensure that the information in a page is not retrieved from cache use the 'Expires' header. You should also be able to use the <META HTTP-EQUIV="Expires" CONTENT=" {date and time here} "> format but it didn't seem to work with the browsers I have - stick to the Expires header.
I really like the PDF concept -- it is much easier to create a PDF page from a DTP program than to convert it into HTML and you get the exact same look as the printed product. I wouldn't use the format to create new content solely for the web, but I like it for creating web pages based on existing material.
The secret behind byte serving is a CGI. First check out Their basic information and then check out the developer's specs.
The idea behind byte range extensions to HTTP is presented in this paper: ftp://ds.internic.net/internet-drafts/draft-luotonen-http-url-byterange-02.txt