C & G web

Client Pull

The 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
If you are using the meta tag to store server-specific information, you use the HTTP-EQUIV attribute. This informs the browser that the value of the attribute needs to be passed along to the server for processing.

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>

Exercise

This is a practical exercise.

  • Copy the above code into a text editor, save it as meta02.htm and place it in a folder named metatag. To test it you should make a file called next.htm and also save it in the metatag folder. Use the following code for next.htm:
    
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    
    Thank you for waiting.
    
    </BODY>
    </HTML>

    Now test meta02.htm in a web browser.


    Slide Shows

    If 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.

    Previous page...

    Back to Top of Page

    Computeach International Ltd

  • Christopher Ward London Limited

    Christopher Ward London Limited