Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 08-11-2008, 09:12 PM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Location: Utah, USA
Posts: 7
Default Code to trigger cache dump?

Hi, I'm new to the forum. I have a question. I couldn't find it anywhere when I searched. Is there a code (html or maybe js) that I can embed into a website to trigger the viewers cache to refresh? The website that I need this for is updated very regularly and my director is concerned about returning viewers loading old images, etc. when they come back to the site. Thanks.
setabkcin is offline   Reply With Quote
Old 08-12-2008, 02:15 AM   #2 (permalink)
Moderator
 
jnjc's Avatar
 
Join Date: Jun 2008
Posts: 365
Default

I think it's fairly difficult to trigger a cache refresh once the page is cached. You best bet is to put something in the page header to tell it not to cache in the first place (or to expire). You can use meta tags like:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

Which 'should' stop you page caching at all or

<meta http-equiv="expires" content="1">

which should set an expiry on your the page cache

You can also set you HTTP server to tell the browser not to cache or set an expiry.

HTH,
JC
jnjc is offline   Reply With Quote
Old 08-12-2008, 10:35 PM   #3 (permalink)
New Member
 
Join Date: Aug 2008
Location: Utah, USA
Posts: 7
Default

I think this worked. Thanks for the help jnjc.
setabkcin is offline   Reply With Quote
Reply

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. The time now is 02:30 AM.


Computer Forum - TechZine - Webpage Design

 
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.