Do not cache

Is there a way to force a page to not be cached. The page contains some dynamic data from a database which should never be cached. This needs to work for Netscape 4.0+ and IE 4.0+
Thanks, RickH
rickh082997Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

punkerCommented:
<META http-equiv="Pragma" CONTENT="no-cache">
or
<META http-equiv="Cache-Control" CONTENT="no-cache"> maybe?

The first one is used commonly. The second one came from a book I have, and I'm not too sure about it.
0
oubelkasCommented:
Haha, punker, maybe? Maybe yes, both can be used (or must be used) ;). Though you might also wanna add this

<META HTTP-EQUIV="Expires" CONTENT="Fri, Jun 22 1990 10:30:00 GMT">

So you'll need these three things in your page in the <head> tags and things should be solved.

Joseph
0
punkerCommented:
I don't know. I tried using these on a CF page, and they didn't work. I know they're meant to work, but in my experience, they do nill.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

oubelkasCommented:
mmmm, interesting....I'll check it out...
0
rupertsCommented:
I have the same problem when using location.href='mypage.htm' even when adding all the no cache stuff.
0
rickh082997Author Commented:
FYI, I am doing this in Cold Fusion also.
RickH
0
punkerCommented:
Rick: In that case, it will not reload the data on the page to reflect changes unless you surf to the page a second time or hit reload. That's my experience with it.
0
PBallCommented:
Try attaching a unique querystring to the url, even if it does not do anything.  It will force a cache.

i.e. in ASP you can do:

<%
  TimeStamp = Now
%>
:
<a href='something.htm?Timestamp=<%=Timestamp%>'>

Works for me.
0
sennisCommented:
I have placed suggestions for site visitors to set their browser to check for a new page everytime.

In IE5 this is in the "Tools" menu, "Internet Options", "General" tab, "Temporary Internet Files", "Settings" button. Under "Check for New Versions of Stored Pages" have the "Every Visit to the Page" radio button selected.

In Netscape 4.7 this is under "Edit", "Preferences", "Advanced", "Cache", then on the right side of the box, under "Document in cache is compared to document on network" choose the radio button labeled "Every Time".

I realize that it is less desireable than setting up the page for no cache, but the user will benefit by getting newest pages always.

0
rickh082997Author Commented:
Thanks, but I must force the no-caching myself.
0
rpmodellCommented:
why do you. if you give the reason for this it may be easier to find an alternative sollution...
0
ahchongCommented:
<META http-equiv="Pragma" CONTENT="no-cache">
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
oubelkasCommented:
ahchong > see our first comments....first read the other comments then answer when really necessary. Best to comment too....

Joseph
0
ahchongCommented:
Sorry about that answer, I realy don't know that I have checked the answer radio button. Sorry about that ...
0
oubelkasCommented:
Yeah, all the newbies do that, you R forgiven, my friend.....but next time, first read the comments so no double comments are made or answers are given with the same content as the previously given comments...ok?

Joseph
0
oubelkasCommented:
rickh> hmmm, I sure do think that punker deserved these points.

ahchong > lucky for you

Joseph
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.