Solved

Force the ISP to Re-load Pages

Posted on 2004-08-11
13
328 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help returning a SOAP Fault using JAX_WS, NetBeans, WSDL 6 59
css help 3 110
RSS Feed Validation 2 59
CSS Question.. 3 77
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now