Solved

server-driven browser refresh

Posted on 2004-08-08
8
230 Views
Last Modified: 2010-04-06
i'm writing a web-based game which works a bit like a message board. moves are made by
submitting a form, the contents of which are sent by asp/php to a db.

at the moment, the only way to find out whether there has been any move since one's own move is to refresh the page  at the client's browser. This places an uneccessary load on the web server when there has been no update to the db in the meantime. is there a way for the *server* to refresh the browsers, or open popups for my users?

many thanks.
0
Comment
Question by:gusset
  • 4
  • 2
  • 2
8 Comments
 
LVL 8

Expert Comment

by:CoolATIGuy
ID: 11748943
Why not just use a meta tag, like this: http://www.html-reference.com/META_httpequiv_refresh.htm

CoolATIGuy
0
 

Author Comment

by:gusset
ID: 11748948
thanks, CoolATIGuy, but that's client-driven, which is what i want to avoid.

gusset
0
 
LVL 8

Expert Comment

by:CoolATIGuy
ID: 11748995
I don't think there is any way to do a refresh from the server...

CoolATIGuy
0
 
LVL 36

Accepted Solution

by:
Zyloch earned 100 total points
ID: 11749005
Hi

There is one way to do it that I've heard about in CGI. It's called server push and you have to use CGI::Push. I'd probably post in the Perl TA asking about it.    

Regards,
Zyloch
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 8

Expert Comment

by:CoolATIGuy
ID: 11749015
0
 
LVL 8

Assisted Solution

by:CoolATIGuy
CoolATIGuy earned 75 total points
ID: 11749204
http://www.perldoc.com/perl5.6/lib/CGI/Push.html - "Only Netscape Navigator supports server push. Internet Explorer browsers do not."

CoolATIGuy
0
 

Author Comment

by:gusset
ID: 11749245
thanks, both. that's no use to me, though. i don't propose to learn Perl and restrict my users to one browser.

i'm splitting the points 100/75 in favour of Zyloch, who pointed us in the right direction first.

i guess what i had in mind was something like the Yahoo! games, i don't know how they do that. perhaps with Java. if anyone happens to know, do share.

best wishes

g

0
 
LVL 36

Expert Comment

by:Zyloch
ID: 11749256
Yahoo games do use Java applets to communicate with their servers. I'm not quite sure if it puts a load on the servers or if there's something special (maybe you can ask in the Java TA) but then again, Yahoo! doesn't have to care about server overloading that much with how much servers it has and will have in the future
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now