Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Force the ISP to Re-load Pages

Posted on 2004-08-11
13
330 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

856 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