# anchors, Server Push and Refresh

Josep Egea jes at rednsi.com
Wed Feb 26 03:53:34 PST 1997


Hi,

This message is quite long. I'm sorry if I make you lose your time/bandwith.

In a recent web we've developed, we use server push for a chat room.  
Basically, it creates a three frames layout with a header, a central frame  
where messages are shown and a footer which lets the user send new messages.

Server push is only used in the central frame. More or less it works this  
way: When the page is requested, a process is started in the server that  
initiates a server push session, gets the current list of messages and  
displays them in the frame. After this, it waits a period and checks for new  
messages. If there are new messages, it sends another "page" in the server  
push cycle. If not, waits again for them.

This process works quite well with OmniWeb 2.1.5 but two problems show:

- Though only a limited number of messages are kept in the server, this list  
is usually bigger than the central frame and a scroll bar must show. In  
order to make the browser scroll to the end of the list (the most recent  
messages), the generated HTML includes a named anchor in its end (<A  
NAME="end">) and the referring URL ends up with #end ; the complete url is:

http://www.smint.com/intense/SweetTalking/ShowMessages.nxph?SesId=8498&userName=guest#end

Unfortunately, OmniWeb doesn't follow this anchor and thus stays at the  
beggining of the document. I must confess that I'm not sure what the correct  
behaviour should be in a server push enviroment, but it works as I want in  
Netscape 2.0 and 3.0.

- The second problem is the following. Due to server load questions, I don't  
want the process which gets new messages and sends them to the client to run  
forever. I prefer to let it run for a while and then restart the whole  
scenario. For achieving that, when the process determines it must die, sends  
a last page with a refresh tag after 5 seconds (<META HTTP-EQUIV="Refresh"  
CONTENT="5">) in the head. After this, sends the last list of messages and  
the "end of session" boundary string that ends the server push dialog and  
exits. Normally, after 5 seconds, the browser should re-request the same URL  
and this would start it over again. This is what happens in Netscape 2.0 and  
3.0, but fails in OmniWeb. It certainly tries to refresh but with an empty  
URL (I know by watching at the processes panel) and thus, gets nothing and  
stops. What's more curious. In the header frame I have "refresh" link with  
the same URL "targeted" to the central frame, but if I click it I get the  
same results. And if I Alt-Click this link to get the URL to the edit field  
and press enter to request it, I get the same result.

I'm not really sure of what's happening. I don't know if it's due to a bug  
in OmniWeb or a fault in my code and would appreciate any help. If you want  
to check it out in action, go to http://www.smint.com.

Unfortunately, one must register to use the chatline and other goodies but  
I've created a "guest" account for you to try. When you get the home page,  
click on the link "Are you already a sminter? click here to identify  
yourself", and enter "guest" both as username and password. When returned to  
the home page, click over "Intense Surfing" and then over "Sweet Talking".

Thanks for your help and sorry for such a long message.

Best regards.
---
Josep Egea   -   jes at rednsi.com  -  NeXTMail & MIME OK
Nexus Servicios de Informacion   -   Barcelona (Spain)
Telf:   + 34 3 285 00 70    -    Fax: + 34 3 285 00 70


More information about the OmniWeb-l mailing list