BleepingComputer.com: Self refreshing page

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Self refreshing page How do I force a web page to refresh itself when loaded from Favourite

#1 User is offline   awestruck 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 20
  • Joined: 23-June 05

Posted 29 November 2008 - 11:06 AM

How do I force a web page to refresh itself when loaded from Favourites.
For example, say someone stores a page in Favourites. I then update some prices on that page and upload it to the host.
The visitor loads the page from Favourites and the prices are wrong because the old page
has been loaded from his hard drive instead of loading the new page from the web host's folder? At that point I would like the page to refresh itself to the new prices
Awestruck

#2 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,605
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 30 November 2008 - 10:20 AM

There are a couple of ways to handle that. First, you don't allow th ebrowser to cache the page using the No-cache option inside the metadata tag. This doesn't always work though since browsers tend to handle the tag differently. One could also use the Expires switch so the page automatically checks for a new version each time the page is loaded. One could also use the Reload switch, but this one tends to make users a little angry, and uses bandwidth. This is useful for updating an entire page, but you really only need the page to be fresh at any given time it loads. Nobody wants to sit through a page that is constantly reloading. Finally, you could use AJAX to just reload the parts that you need, which greatly decreases bandwidth, and is generally the right way to make sure that your content is up to date.
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#3 User is offline   awestruck 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 20
  • Joined: 23-June 05

Posted 30 November 2008 - 11:16 AM

Thank you Groovicus for your very prompt reply, I will look into the various options. The usual Refresh meta tag is definitely not on as the page would keep refreshing as you say. Not very helpful when the visitor is trying to order something on that page.

Best Wishes

Awestruck

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users