Author |
Message |
tyjtyj
Junior WebHelper
Joined: 22 Feb 2002
Posts: 20
|
Posted:
Fri Feb 22, 2002 12:43 am (22 years, 2 months ago) |
|
how to include no cache to prevent the page from being cache |
________________________________ Justin Store
http://www.tyjtyj.com |
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Fri Feb 22, 2002 1:08 am (22 years, 2 months ago) |
|
Don't know the answer to the question, but you have a damn good site, VERY Handy, has been bookmarked and I will recommend it. |
|
|
|
|
Gandalf
WebHelper
Joined: 08 Jan 2002
Posts: 52
Location: Israel
|
Posted:
Fri Feb 22, 2002 1:33 am (22 years, 2 months ago) |
|
The following META tag should do the trick. Just insert it into your HTML file, at the < head > part of it.
Code: | <META content=no-cache http-equiv=pragma> |
|
________________________________ Everything should be made as simple as possible, but no simpler. |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Feb 22, 2002 8:39 am (22 years, 2 months ago) |
|
And if you want to be XHTML compliant:
Code: | <meta content="no-cache" http-equiv="pragma" /> |
|
________________________________
|
|
|
|
Ben
Senior WebHelper
Joined: 08 Jan 2002
Posts: 431
Location: Liverpool - UK
|
Posted:
Fri Feb 22, 2002 1:48 pm (22 years, 2 months ago) |
|
Netapps caches ignore such meta tags, not sure about Inktomi and Squid, but I'd imagine they are the same... |
________________________________ Ben Scott
Red and White Kop |
|
|
|
JdS
Junior WebHelper
Joined: 08 Jan 2002
Posts: 24
Location: KUL, Malaysia
|
Posted:
Fri Feb 22, 2002 1:57 pm (22 years, 2 months ago) |
|
yep, won't do anything if your ISP or reader's ISP caches... i learnt that the hard way!
if ur using apache - then u can use mod headers/expires to control what gets cached etc
if ur using PHP, then it's also possible by adding something like Code: |
$now = gmdate("D, d M Y H:i:s") . " GMT";
header ("Date: $now");
header ("Expires: $now");
header ("Last-Modified: $now");
header ("Pragma: no-cache");
header ("Cache-Control: no-store, no-cache, max-age=0, must-revalidate"); |
|
________________________________ JdS from
The Learning Journal
'New script on the Block' - GIDtopsites |
|
|
|
tyjtyj
Junior WebHelper
Joined: 22 Feb 2002
Posts: 20
|
Posted:
Fri Feb 22, 2002 5:03 pm (22 years, 2 months ago) |
|
thanks for the code
and
Justin
thank for recomending it
anyway my name is Justin too |
________________________________ Justin Store
http://www.tyjtyj.com |
|
|
|
JdS
Junior WebHelper
Joined: 08 Jan 2002
Posts: 24
Location: KUL, Malaysia
|
Posted:
Fri Feb 22, 2002 5:11 pm (22 years, 2 months ago) |
|
ooops, sorry Justin Tan, i didn't notice that u were on Tripod. One 'cheat' way to get your page not cached is to use that TRIPOD 'cache buster' code that they use to serve their banner ads, on your pages! |
________________________________ JdS from
The Learning Journal
'New script on the Block' - GIDtopsites |
|
|
|
tyjtyj
Junior WebHelper
Joined: 22 Feb 2002
Posts: 20
|
Posted:
Sat Feb 23, 2002 1:06 am (22 years, 2 months ago) |
|
I been running perl/cgi in my page that why there are no ad in my page i dont know how to get the cache look like |
________________________________ Justin Store
http://www.tyjtyj.com |
|
|
|
Ben
Senior WebHelper
Joined: 08 Jan 2002
Posts: 431
Location: Liverpool - UK
|
Posted:
Sat Feb 23, 2002 2:41 am (22 years, 2 months ago) |
|
Most caches wont cache your site if its mainly cgi as cgi is mostly dynamic content. |
________________________________ Ben Scott
Red and White Kop |
|
|
|
death2all
Junior WebHelper
Joined: 12 Feb 2002
Posts: 8
Location: Ninth Hell
|
Posted:
Tue Feb 26, 2002 2:13 pm (22 years, 2 months ago) |
|
Add just bellow the title tag:
Code: | <META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT"> |
This way the page will be already expired so it won't be cached. |
________________________________
|
|
|
|
Garth Farley
WebHelper
Joined: 08 Jan 2002
Posts: 69
Location: Ireland
|
Posted:
Tue Feb 26, 2002 2:51 pm (22 years, 2 months ago) |
|
That meta tag is ignored by a vast quantity of browsers out there. The header is usually a more reliable way of preventing caching, but even then some things ignore it.
The best way is to change all the extensions of your .html files to .php, if you use no PHP at all, and if you do, with .htaccess help, you could have a .phtml extension that is not parsed. Then the cacheing program will think it's dynamically generated, when in actual fact it's not.
Garth Farley |
|
|
|
|
tyjtyj
Junior WebHelper
Joined: 22 Feb 2002
Posts: 20
|
Posted:
Tue Feb 26, 2002 3:56 pm (22 years, 2 months ago) |
|
Thank for all the post
acctually
the simple meta tag has work
in IE
i dont mind with other browser
Tripod doesn't provide php support
Thank for all the help |
________________________________ Justin Store
http://www.tyjtyj.com |
|
|
|
|