How to change a cached file when original file get modified.

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
aneeshrp
Forum Newbie
Posts: 3
Joined: Thu Aug 19, 2010 6:04 am

How to change a cached file when original file get modified.

Post by aneeshrp »

Hi All,

I have a website which is fully cached using headers. However when I make a change in the source file it is not appearing immediately in the browser, istead it shows only when I do a Ctrl+F5 refresh in my browser. Any way to sort out this issue, I want to load the original content in which I made the change.

Solutions are appreciated.
Bind
Forum Contributor
Posts: 102
Joined: Wed Feb 03, 2010 1:22 am

Re: How to change a cached file when original file get modif

Post by Bind »

add anti-cache headers or you can go ghetto with a UID added to the uri/query_string.
aneeshrp
Forum Newbie
Posts: 3
Joined: Thu Aug 19, 2010 6:04 am

Re: How to change a cached file when original file get modif

Post by aneeshrp »

Thanks very much Bind for the reply.
Bind wrote:add anti-cache headers or you can go ghetto with a UID added to the uri/query_string.
The second option is not possible as I am expecting 100s to 1000s of changes perday.

First option looks pretty much acceptable, however if we anti-cache headers, then it will allow the other contents which we needed to be in cache ..am I correct?
Post Reply