Using Client Pull Technology with eComet Applications

 

 

This tip explains how to use your web browser’s client pull technology to automatically display two web pages in sequence. This can be very useful for some eComet applications. For example, suppose you create an eComet program that processes a large amount of data before displaying the results. While the user is waiting to see the web page, you might want to display a message such as “Please wait while your information is being prepared…”

 

Here’s how to make this happen. You will need to create two eComet programs:

 

 

 

Here’s a picture of the process:

 

 

Here are the HTML commands that your first eComet program must send to the web browser:

 

<HTML>

<HEAD>

<TITLE>

Please wait while your information is being prepared…

</TITLE>

<META HTTP-EQUIV=”Refresh” CONTENT=”0; URL=fully-qualified-url”>

</HEAD>

<BODY>

Please wait while your information is being prepared…

</BODY>

</HTML>

 

Notice the <META> tag in the <HEAD> section. This tag instructs the web browser to refresh the page by pulling a new web page from the eComet server. The CONTENT parameter contains the important details:

 

CONTENT=“0; means to refresh the page after 0 seconds (immediately).

 

URL=fully-qualified-url” contains the full URL of the second eComet program, including domain name, port number (if it’s something other than the default value of 80), and program name (including the /xap prefix).

 

For example, if the second eComet program was named PULL2 and was located on signature.net, port 8080, the <META> tag would be:

 

<META HTTP-EQUIV=”Refresh” CONTENT=”0; URL=http://signature.net:8080/xap/pull2”>

 

As a result, the first eComet program displays the “Please wait…” message and immediately starts the second eComet program running on the server. The wait message remains on the browser screen until the second program starts to display its output.

 

The client pull concept is further demonstrated in the BLAST2 program (source name is XBLAST2) in the eComet tutorial.

 

The major web browsers, including Internet Explorer and Netscape Navigator, support client pull technology. See the following web page for more information:

 

www.netscape.com/assist/net_sites/pushpull.html