![]() |
|||||
|
|
Client PullThe slide show that you saw at the start of this module is an example of client-pull. Your browser (the client) is pulling something down from the server, in this case another HTML page.You do this in the following way: <META HTTP-EQUIV=refresh CONTENT="number of seconds; URL=filename"> The browser will wait for the specified number of seconds and then download and display the file at the specified URL. The HTTP-EQUIV attribute
With the HTTP-EQUIV attribute, a variety of HTTP headers can be used. The most useful are those that allow client-pull and site filtering. You use HTTP-EQUIV because you are using the meta tag to communicate with the server. The value refresh is a command that most servers recognise. To ensure that this works with the maximum number of servers, the <META> tag must be the very first tag in the HTML file, even before the opening <HTML> tag. The following code will load a new page (next.html) page after six seconds. This is a nice way of having a splash screen at the entrance to your site: <META HTTP-EQUIV=refresh CONTENT="6; URL=next.htm"> <HTML> <HEAD> <TITLE>Untitled</TITLE> </HEAD> <BODY> Please wait for six seconds. </BODY> </HTML> ExerciseThis is a practical exercise.<HTML> <HEAD> </HEAD> <BODY> Thank you for waiting. </BODY> </HTML> Now test meta02.htm in a web browser. Slide ShowsIf next.htm also has a meta tag that jumps you to a third page after a short period, you have a three page slide show.
© 2002 Ashley Preston |
||||
|
|
|||||