Self refreshing web page

  Awestruck 13:21 PM 29 Nov 08
Locked

How do I force a web page to refresh itself when a page is 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?
Awestruck

  Forum Editor 16:38 PM 29 Nov 08

<META HTTP-EQUIV="REFRESH" CONTENT="5">

and it will force your visitor's browser to refresh the page every 5 seconds.

  DieSse 20:33 PM 29 Nov 08

"For example, say someone stores a page in Favourites."

Favorites doesn't store web pages - it stores URLs - ie the link to a web page on the web.

What can happen is that if a user hasn't set the temporary internet files (ie the cache) to clear when the browser closes, then a page may be loaded from the cache rather than from the web.

FEs solution will work - just trying to explain how users really do get out of date pages.

  Awestruck 21:38 PM 29 Nov 08

Many thanks for your prompt replies folks.
I will add the meta information as recommended. Most grateful for the explanation about the cache, I had not under stood its significance before.
Have a great Christmas
Awestruck

  Forum Editor 23:21 PM 29 Nov 08

The visitor clicks on a favourite, and the browser loads the page from the computer's hard drive - if the cache still retains a copy of it. Many people set their browser options to refresh a page each time it's visited anyway, so they will always see the current version.

  Awestruck 10:07 AM 30 Nov 08

Hello Forum Editor
Thanks for confirming my interpretation of Favourites, I was convinced that some pages were retained on the hard drive because many of my Favourite pages are accessible off-line. Some are not, and these point to a URL as explained by DieSse.

I decided against using the refresh code as this surely gives an infinite loop? Not a good thing when the person is trying to buy somehing on a page that changes every 5 seconds (or have I misunderstood its behaviour?

Awestruck

  DieSse 10:44 AM 30 Nov 08

I don't want to start an argument here - but

Favorites ONLY stores the address of web pages (look at the properties of a Favorite and you'll see the address in Properties.)

The browser quite separately from this controls the cache - which has nothing to do with Favorites.

When a web page is called for, from any point (from Favorites, an embedded link, typing into the address bar, etc) then the browser first looks to see if the web page, or parts of it, are stored in the cache. If they are the browser uses that - if not it looks on the web (subject to some browser settings).

Yes - some of your Favorites may be found off-line, from the cache. That's only because you're not clearing the cache when your browser closes (you can - it's just a setting). It's NOT to do with your putting them into Favorites.

My point was merely to explain the mechanism - that it's not Favorites that control off-line availability of web pages, but the browser, via the cache (and various settings.)

  DieSse 10:51 AM 30 Nov 08

PS - it's often considered good practice to clear the Temporary Internet Files (the browser cache) when your browser closes.

It avoids problems like you describe (getting old web pages) - it deletes any malware stuff that creeps in under your protection - it stops the cache getting excessively big, which is never a bad thing - and generally avoids confusion about what's coming from where.

If you really want to store pages off line, for specific reasons, there is a proper mechanism for doing so (in Firefox I use Scrapbook).

  Awestruck 10:56 AM 30 Nov 08

Thanks DieSse
I understand the difference between the cache and Favourites but my point was that the page is on the hard disk. Few surfers would know about the cache so to all intents and purposes, they believe that the page came from the Favourites. You and I know it comes from the cache which is on the hard disk.
Awestruck

  DieSse 11:18 AM 30 Nov 08

OK - just making sure we all understood the why.

You could try using FEs suggestion (which does seem to be the accepted way of doing it) - but you don't need to set to 5 secs - you could try it set to much longer, just put in a different value.

  DieSse 11:20 AM 30 Nov 08

Here's some other ideas for you to look into

click here

I can't vouch for them, sorry.

Advertisement

This thread is now locked and can not be replied to.

14 best budget laptops of 2015: best budget laptops reviews - best cheap laptops - best bargain…

1995-2015: How technology has changed the world in 20 years

Nokia rolls out spherical camera for virtual reality apps

From Antennagate to Yellowgate: The 10 worst Apple scandals (and why they were blown out of proport)…