|
|

Server Push - HoloPush
Overview
Server push allows a server to send continual updates of a document or image.
Server push can be implemented with custom scripts or with the
".holopush" extension.
This feature is available for both standard and demo HoloWWW service.
For more information, see also:
For the most part, animated .gif images have superceded the use of server push,
but whereas animated .gifs are static files, server push scripts can be
customized to provide greater flexibility.
Example
This is a script file called "sample.holopush":
404 Not Found
Not Found
The requested URL /htbin/holopush/support/holowww/sample.holopush was not found on this server.
Apache/1.3.22 Server at www.holonet.net Port 80
Example HTML
<IMG SRC="sample.holopush" WIDTH=468 HEIGHT=60 ALT="[SAMPLE]">
Example Parsed HTML
![[SAMPLE]](sample.holopush)
If your browser supports Server Push, the above image would change randomly
every 3 seconds.
[Back to Top]
HoloPush Instructions
- # comment
- HoloPush ignores lines starting with a "#".
- dec variable
- Subtracts one from the variable.
- delay seconds
- Delay by seconds. Partial seconds can be specified with a decimal point.
- end
- HoloPush closes the connection and stops.
- goto labelname
- Execution continues at the named label
- goto-random odds1:labelname1 .. oddsN:labelnameN
- Jumps to a label at random. The odds of a labelnameX being choosen is oddsX out of the total odds.
- if variable labelname
- If variable is non-zero then exection continues at labelname.
- ifnot variable labelname
- If variable is zero then exection continues at labelname.
- inc variable
- Adds one to the variable.
- label labelname
- Names the current line labelname. See also: goto, if, and random.
- multipart
- Notify HoloPush that multiple graphics will be sent. If more than one graphic will be sent, this command is required before the first is sent.
- send filename
- File name is relative to the .holopush file. Variables can be placed in file names by enclosing them in braces. For example: 'sendfile "image{count}.gif"'.
- send-random odds1:file1 .. oddsN:fileN
- Sends a file at random. The odds of a fileX being choosen is oddsX out of the total odds. File name is relative to the .holopush file. Variables can be placed in file names by enclosing them in braces. For example: 'sendfile "image{count}.gif"'.
- serverpush
- This is a pre-set variable. If HoloPush believes the browser supports server push then this variable is set to 1. Otherwise, it is 0.
- set variable=number
- Set a variable to number. Variable names must begin with a letter and contain only letters, digits, underscores, and dashes. number must be an integer.
[Back to Top]
Technical Notes
- To prevent abuse by non-HoloWWW customers, HoloPush requires that the calling browser provide a REFERER of one of your Web pages.
- HoloPush does not send the same file twice in a row, the send command is skipped.
-
HoloPush ignores blank lines in .holopush files.
- To disable server push, you can set the serverpush variable as follows:
set serverpush=0
You might want to do this in order to test how your script would be viewed
on a browser which does not support server push.
[Back to Top]
|