Posted on: 03/12/08 03:43am
By: Anonymous (Rizwana Rizia)
Hi,
I am using geeklog 1.3. I am facing a caching problem with Ie, that IE is always caching the files and i cant see the latest updated files without refreshing the page. I used the followin tags in the template header.thtml and footer.thtml
<HTML>
<HEAD>
<META HTTP-EQUIV="REFRESH" CONTENT="5">
<TITLE> Pragma No-cache </TITLE>
</HEAD>
<BODY>
Body Content
</BODY>
<HEAD>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</HEAD>
</HTML>
To prevent from caching but the file is still cached. But only Ie caches the files not FireFox. I also changed the COM_refresh function to the following
function COM_refresh( $url )
{
//return "<html><head><meta http-equiv=\"refresh\" content=\"0; URL=$url\"/></head></html>\n";
if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE"
)
{
header('Expires: -1'
;
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'
;
header('Pragma: public'
;
}
else
{
header('Expires: -1'
;
header('Pragma: no-cache'
;
}
header('Location:' . $url);
exit;
} but still having the caching problem with IE. :banghead:
Can any one please help me on this. I need an urgent solution.
Re: caching problem
Posted on: 03/12/08 09:58am
By: samstone
1.3 is too old. What's preventing you from upgrading to 1.4.1? That's the best solution.
Peace!
Sam
Re: caching problem
Posted on: 03/12/08 10:39am
By: Dirk
Assuming it's not literally "1.3" but the latest 1.3.11, then upgrading won't really make a difference.
The above examples don't make a lot of sense, though. There should be exactly one <head> and one <body> area on your site. And the no-cache meta tag belongs into the <head>.
Caching is a tricky topic. Proxies may play into it and some browsers (e.g. Opera) default to an aggressive caching that sometimes causes problems.
A URL to the site would help ...
bye, Dirk
Re: caching problem
Posted on: 03/12/08 12:27pm
By: Anonymous (Rizwana Rizia)
Hi,
The version i am using is 1.3 . and the reason for using two head tag is i found for IE to prevent from caching sometimes it works if i add another no-cache just befor ending of the html file. I found it on net while searching for how to prevent IE from caching. maybe i;ll try for version conversion if that helps
Re: caching problem
Posted on: 03/12/08 12:38pm
By: Dirk
Quote by: Rizwana RiziaThe version i am using is 1.3 . and the reason for using two head tag is i found for IE to prevent from caching
Both of this sounds so wrong ...
Geeklog 1.3 came out in December 2001. Please don't tell me you're using a version that's almost 7 years old.
And using invalid HTML will usually cause more problems than it "solves".
bye, Dirk
Re: caching problem
Posted on: 03/14/08 01:40am
By: Anonymous (Rizwana Rizia)
Hi
I tried by upgrading the version and it didnt work. The pages are still cached.
Re: caching problem
Posted on: 03/14/08 01:14pm
By: Laugh
In IE 7 do you have "Check for newer versions of web pages" set to always? This setting can be found under Browser History in internet options. For older IE browsers check under the advance tab.
Re: caching problem
Posted on: 03/16/08 02:10pm
By: Anonymous (Rizwana Rizia)
That doesn't solve the problem, if i need to change browser setting. all the users of the site will then have to change the settings. there will be so many users of this site.
Re: caching problem
Posted on: 03/17/08 08:30am
By: Anonymous (Rizwana Rizia)
Hi again,
Can anyone give any idea if i can refresh the page while loading using window.location.reload(). I was trying using it. But the problem is i was trying to write the script on onload event of body which resulted in an infinite loop. Can any one suggest any wa how i can implement it.