Solved

Force the ISP to Re-load Pages

Posted on 2004-08-11
13
329 Views
Last Modified: 2010-04-06
Hello,

Thanks so much for reading our question.  In our part of the world, the ISPs often do not check for new pages each time someone comes to our site, relying instead on a cache of the site's content.  We have one page the we would like to always be pulled freshly from the server.  Is there any code we can add to the page to make the latest version of the page appear?  To ovveride the cache, and pull the latest data each time someone visits the page.  Open to all solutions, frames- wise and others, just so want to have people see that page in real-time.  

Many thanks,

Yunkaa
0
Comment
Question by:yunkaa
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 33

Accepted Solution

by:
sajuks earned 400 total points
ID: 11770572
<HTML>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
<BODY>

Your other text
</BODY>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
</HTML>

Basically you repeat the meta tags both in the head and at the end of the page.


If its an ASP page, you can've this at the top
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>
0
 
LVL 33

Expert Comment

by:sajuks
ID: 11770582
php, you can've this at the top
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    
header ("Cache-Control: no-cache, must-revalidate");  
header ("Pragma: no-cache");
0
 

Author Comment

by:yunkaa
ID: 11775191
Hello Sajuks

Thanks SO MUCH for answering our question!!  Please could you give us a little background on these tags?  What does this one do:  <META HTTP-EQUIV="Expires" CONTENT="-1">  Ours is just a straight HTML page.

Many thanks,

Yunkaa
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 11778776
I don't think you can overcome the ISP caching strategy without access to their server configuration.  It does not matter what is coded in the page to prevent caching if the ISP has configured the server always cache.

Cd&
0
 

Author Comment

by:yunkaa
ID: 11778888
Hello CD!!

Thank you very much for responding to a question!!  What the sites like CNN.com and other news sites do in this situation?  So if the ISP is cache-ing would people see old news?  Do they use meta tags?  

Many thanks,

Yunkaa

0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 100 total points
ID: 11779110
No one can really do much about it except complain.  The ISPs cache the pages to save bandwidth, and improve response time  They cache the pages on there own servers then when a user makes a page request, if they have an unexpired page in cache they return that instead of routing out across to the requested site.

Most of the time that is beneficial to the user.  The better ISP are selective about which sites they cache, and some will respect the caching indicated on the page, but no caching would mean they have to buy more bandwidth to maintain response time, so it is an issue that effects their profitability.

Cd&
0
 

Author Comment

by:yunkaa
ID: 11780414
Hello CD!

Thanks so much for answering!!  Does the "no-cache" tag work?  If it doesn't keep pages from being cached, what does it do?

Many thanks x 1,000...

Yunkaa
0
 
LVL 33

Expert Comment

by:sajuks
ID: 11780783
AS CD has rightly remarked, "No one can really do much about it except complain.".

If your ISP is among the better ones then the meta tags will work.

<META HTTP-EQUIV="Expires" CONTENT="-1"> :--->
That sets an immediate expiration on the file.

Prior to IE5 , the tag <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> used to suffice, but due to bugs
the tag <META HTTP-EQUIV="Expires" CONTENT="-1"> also starte being used.
0
 
LVL 33

Expert Comment

by:sajuks
ID: 11780791
CNN uses  a meta tag
<meta http-equiv="refresh" content="1800">
which ensures thats the pages gets reloaded every 30 minutes (1800 seconds)

0
 

Author Comment

by:yunkaa
ID: 11784122
Hello CD And Sajuks!

Does the meta tag work?  If an ISP is cache-ing, will this make it not cache the particular page?

Many thanks x 10,000...

Yunkaa
0
 
LVL 1

Expert Comment

by:lth2h
ID: 11784243
Other than the meta tags, I'd suggest finding an ISP isn't broken.  If you're paying this ISP there is no excuse for what they're doing.  
0
 

Author Comment

by:yunkaa
ID: 11785557
Hello Sajuks and CD   >>> 

 THANK YOU FOR TAKING THE TIME TO PROVIDE THE WONDERFUL CODE, RESEARCH AND ADVICE! :))))))))))))))))))))))))))))))))))))))))))))))))))))
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

Yunkaa
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 11785619
The meta tags are for the browser.  Good ISP who are caching will respect the meta tags, but there is nothing that compels them to.

Glad we could help.  Thanks for the A.

Cd&
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

832 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