0

Is there a way to push pages on change rather than putting a timer on a web page to refresh every x mins? I guess what Im trying to do is not refresh an entire page when only a portion of it may have changed. I have seen on FB when an update happens, it has message saying new content available.

Perhaps you could MD5 a page then when an update happens the MD5 changes and the page could be checking this. Not exactly push but it would reduce the traffic of an entire page.

How can I update a webpage when a change occurs on the server?

katalin_2003
  • 701
  • 1
  • 13
  • 27

2 Answers2

0
  1. a good practice to "reduce the traffic" is to load content through AJAX requests.
  2. the "timer" you mentioned above is my preferred method with my previous comment and a bit of extra logic. This is know as long-polling.
TMB
  • 4,603
  • 4
  • 22
  • 43
-2

One way is to watch for specific keyboard events and/or mouse events and update the page if certain criteria is met within those events.

Darrell Brogdon
  • 6,411
  • 8
  • 43
  • 57