Solved

server-driven browser refresh

Posted on 2004-08-08
8
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

695 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