iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-25-2004, 05:30 AM
WebProWorld New Member
 
Join Date: Feb 2004
Location: England, UK
Posts: 5
simplyeasier RepRank 0
Default How can I force browsers to auto refresh ?

Hi Forum

My website content changes frequently and I am concerned that many of my visitors are not seeing the updated content because their browsers are using a cached image.

Is there a way to force browsers to auto refresh when they visit your site - so the visitor is getting the latest content every time ?

Charles
Reply With Quote
  #2 (permalink)  
Old 02-25-2004, 08:20 AM
paulhiles's Avatar
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: UK
Posts: 2,089
paulhiles RepRank 0
Default

Try adding the following meta tags to the head section of your page's code.
This will help prevent caching of the page.

<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Expires" content="-1">


NB: The -1 setting for the page expiry works for Internet Explorer, but other browsers will ignore it. I'm reliably informed that replacing the -1 with a real date from the past will work more effectively. As illustrated below:

<meta http-equiv="expires" content="Wed, 21 Aug 1996 12:15:39 GMT">

Some sites also use the Pragma no-cache tag, however this doesn't work for IE 5 browsers, with the result that headers are often filled with a combination of the different metatags in the hope that one of them is going to work! :o)

Remember, that the purpose of the browser's cache is to speed up the response on revisiting the server, so if you have a heavy download on your site's page, this may marginally impair performance.

Hope that helps,

Paul

PS. Here are some additional links for further reading:

Caching Tutorial for Web Authors and Webmasters
http://www.web-caching.com/mnot_tutorial/

HOWTO: Prevent Caching in Internet Explorer
http://support.microsoft.com/default...b;EN-US;234067

"Pragma: No-cache" Tag May Not Prevent Page from Being Cached
http://support.microsoft.com/default...b;EN-US;222064
Reply With Quote
  #3 (permalink)  
Old 02-25-2004, 07:53 PM
carju1's Avatar
WebProWorld Veteran
 
Join Date: Jul 2003
Location: Wettest West Wales, UK
Posts: 653
carju1 RepRank 1
Default

Paul's right that's about all you can do (I always add the Pragma <meta HTTP-EQUIV="Pragma" CONTENT="no-cache"> tag as well).

However I know from experience that it still won't be enough with the worst offenders for cache delvery being corporate connections rather than normal ISP's.

On at least one Motorsports site I was doing I found that the corporate client themselves were getting cached pages and as it was being updated with race reports every 15 minuteds I ended up putting a time stamp on the page and telling users if the time stamp was more than 30 minutes old to manually refresh their browser (And sometimes systems would still provide cached pages even on a F5 request)

Charles if you are renewing content on a very regular basis make sure you tell people this on your home page every little helps.

Regards

Julian
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:58 AM.



Search Engine Optimization by vBSEO 3.3.0