Welcome to Geeklog, Anonymous Wednesday, December 07 2022 @ 12:25 pm EST

Geeklog Forums

caching problem


Rizwana Rizia

Anonymous
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"Wink)
{
header('Expires: -1'Wink;
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'Wink;
header('Pragma: public'Wink;
}
else
{
header('Expires: -1'Wink;
header('Pragma: no-cache'Wink;
}
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.
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
1.3 is too old. What's preventing you from upgrading to 1.4.1? That's the best solution.

Peace!

Sam
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
 Quote

Rizwana Rizia

Anonymous
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


 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: Rizwana Rizia

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


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
 Quote

Rizwana Rizia

Anonymous
Hi
I tried by upgrading the version and it didnt work. The pages are still cached.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1447
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.


One of the Geeklog Core Developers.
 Quote

Rizwana Rizia

Anonymous
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.
 Quote

Rizwana Rizia

Anonymous
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.
 Quote

All times are EST. The time is now 12:25 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content