A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearHtml / php page being cached (client side) when it should not be - page 1
User InfoPosts
Html / php page being cached (client side) when it should not be#1
URL is here: http://www.thexsoft.com/DownloadFolder/download.php?file=P2PTransfer

This page is basically a way for me to have set url to download a certain problem i published. This page should never ever be cached, but it seems to be caching still.

I have set the following items:

<meta http-equiv="expires" content="0" >
<meta http-equiv="cache-control" content="no-cache" >
<meta http-equiv="pragma" content="no-cache" >
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" >


The html code on the page validates 100% when i don(t have the fastclick.net ad code in, but i keept it in now because it normally is in.

posted date: 2009-04-14 07:44:00


Re: Html / php page being cached (client side) when it should not be#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-14 07:44:01


Re: Html / php page being cached (client side) when it should not be#3
Pragma: no-cache prevents caching only when used over a secure connection (https). A Pragma: no-cache META tag is treated identically to Expires: -1 if used in a non-secure page. The page will be cached but marked as immediately expired.http://support.microsoft.com/kb/234067<META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META HTTP-EQUIV="Expires" CONTENT="-1">

posted date: 2009-04-14 07:49:00


Re: Html / php page being cached (client side) when it should not be#4
Yes, in some circumstances browsers cache aggressively, especially IE6. You need to check the http headers your server is sending, and if that isn(t the issue try a cachebusting URL (insert a random/timebased get variable) to make the browser think it(s a new URL.

posted date: 2009-04-14 07:51:00


Re: Html / php page being cached (client side) when it should not be#5
Does this trick works even for the CSS on the page?

posted date: 2009-04-14 08:05:00


Re: Html / php page being cached (client side) when it should not be#6
I believe that you're incorrect about "pragma: no-cache" only preventing caching for HTTPS connections, unless you are talking about how some very specific version of some browser acts.

posted date: 2009-04-14 08:14:00


Re: Html / php page being cached (client side) when it should not be#7
@DaNiel CSS doesn't belong in the same place as the markup, especially when you're worried about caching issues.

posted date: 2009-04-14 08:19:00


Re: Html / php page being cached (client side) when it should not be#8
@Eddie this is how IE works. You can check it out here support.microsoft.com/kb/234067

posted date: 2009-04-14 10:26:00


Re: Html / php page being cached (client side) when it should not be#9
I checked your headers using Firebug:Cache-Control: max-age=1209600Expires: Tue, 28 Apr 2009 18:49:15 GMTIn PHP you can send HTTP headers with header().header((Pragma: no-cache();header((Expires: -1();header((Cache-Control: must-revalidate, post-check=0, pre-check=0();

posted date: 2009-04-14 11:17:00


Re: Html / php page being cached (client side) when it should not be#10
I think you should use header('Cache-Control: no-cache'); see this page w3.org/Protocols/rfc2616/rfc2616-sec14.html

posted date: 2009-04-14 22:50:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.