0

Hi and thank you for your time in advance,

My question is I have a folder /folder-name/ on my server and we change the index.html file in here regularly but for some older browsers and clients they never get the updated information because the old information is cached in their old browser. So I have used this tactic:

How to control web page caching, across all browsers?

But it doesn't work all the time. My idea was to change the file to something different (using date so its unique) and whenever anyone goest to that folder it just defaults to show whatever HTML file is in there. This way the browser would refresh the cache thinking it is a new page each time.

So when the user goes to www.domain.com/folder-name/ it just loads whatever HTML file is in there.

Thanks again for your time.

UPATE:

This is the page: http://www.avrs.com/DMVseminars/

And what happens is certain users (older IE browsers) are caching the schedule and people call in saying they are seeing a schedule 6 months ago. I can't recreate the issue but we get about 5-10 calls a month.

Community
  • 1
  • 1
BHCOM
  • 114
  • 1
  • 2
  • 11
  • what language you are using, what browsers did you test it? please show us your code, and environment variables. – vaso123 Oct 28 '14 at 22:29
  • I agree, there are too many variables to give a sensible answer. What you are asking for is CERTAINLY possible but you have to have the correct server configuration. – Julian Knight Oct 28 '14 at 22:48

2 Answers2

0

Hmmm...

There is a clever fix for this. Have an iframe spanning you whole page, and have it point to your main index.html file.

Like so:

<iframe 
href = 'html/index.html' 
style = 'width:100%;height:100%;border:none;outline:none;'
></iframe>

Good luck! I hope this works!

DripDrop
  • 966
  • 1
  • 8
  • 18
  • Hi DripDrop thank you for your time. This was a thought but I don't really want to use an iFrame if I can. But I will keep this option in mind. Would this still be responsive and work on Mobile and Tablet devices. Also wouldn't this code go on the index.html page and the href= would be something like seminar-10-14.html ? Thanks. – BHCOM Oct 28 '14 at 23:17
  • No problem! This was just a thought, but if you don't want an IFrame, that's all up to you. Glad I could help. – DripDrop Oct 28 '14 at 23:20
0

Try adding these tags to your page's <head>. I use these on a site i developed a few years ago and haven't had any cacheing issues reported.

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

Reference

Community
  • 1
  • 1
JRulle
  • 6,853
  • 6
  • 36
  • 60