[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Do not cache

Posted on 1999-11-18
16
Medium Priority
?
229 Views
Last Modified: 2010-04-09
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
0
Comment
Question by:rickh082997
  • 5
  • 3
  • 2
  • +5
16 Comments
 

Expert Comment

by:punker
ID: 2217705
<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
 
LVL 4

Expert Comment

by:oubelkas
ID: 2217734
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
 

Expert Comment

by:punker
ID: 2217766
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 4

Expert Comment

by:oubelkas
ID: 2217792
mmmm, interesting....I'll check it out...
0
 
LVL 4

Expert Comment

by:ruperts
ID: 2217855
I have the same problem when using location.href='mypage.htm' even when adding all the no cache stuff.
0
 

Author Comment

by:rickh082997
ID: 2217878
FYI, I am doing this in Cold Fusion also.
RickH
0
 

Expert Comment

by:punker
ID: 2217885
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
 
LVL 6

Expert Comment

by:PBall
ID: 2218046
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
 

Expert Comment

by:sennis
ID: 2220410
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
 

Author Comment

by:rickh082997
ID: 2220740
Thanks, but I must force the no-caching myself.
0
 

Expert Comment

by:rpmodell
ID: 2224702
why do you. if you give the reason for this it may be easier to find an alternative sollution...
0
 

Accepted Solution

by:
ahchong earned 100 total points
ID: 2264596
<META http-equiv="Pragma" CONTENT="no-cache">
0
 
LVL 4

Expert Comment

by:oubelkas
ID: 2264638
ahchong > see our first comments....first read the other comments then answer when really necessary. Best to comment too....

Joseph
0
 

Expert Comment

by:ahchong
ID: 2264747
Sorry about that answer, I realy don't know that I have checked the answer radio button. Sorry about that ...
0
 
LVL 4

Expert Comment

by:oubelkas
ID: 2264770
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
 
LVL 4

Expert Comment

by:oubelkas
ID: 2265800
rickh> hmmm, I sure do think that punker deserved these points.

ahchong > lucky for you

Joseph
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question