Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Self refreshing page


  • Please log in to reply
2 replies to this topic

#1 awestruck

awestruck

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:04:34 PM

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

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:34 PM

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.

#3 awestruck

awestruck
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:04:34 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users