Previous Thread
Next Thread
Print Thread
Rate Thread
#280004 09/24/2004 10:51 PM
Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

Since the first affordable broadband has just been offered in Bangkok many of my members living here have moved to it. And that seems to be causing a bit of a problem as this ISP seems to cache pages.

This results in members often getting an old page (usually the main index) and it seems that they are logged in as somebody else. Hitting CTRL-F5 to force a refresh solves this, and they cannot actually get into any of the private areas of other members.

However, I have some hidden forums on my board and I would really prefer people without access not knowing about them. I use this ISP as well though and I can imagine it is possible that someone without access gets a copy of my main index page, and would then see these forums.

So, I am asking for suggestions on how to fix this. I thought of maybe adding the user's displayname or userid to the URL, but am open for other suggestions (nor do I know how to do that I have to admit).

Sanuk!

PS We are on 6.4.1 beta (hopefully moving to 6.5 soon)

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, I wonder if that would do the trick. Append their username and/or usernumber to the URLs leading to the main index, and postlist.

Or even better - when generating the links - grab the unix timestamp, which would be a 10 digit number - changing every second, and append it as a variable to the URL. Then the URL would be different.

Assuming they only get served a cached page if the URL (and variables in it) is exactly the same, this would keep every URL unique (even for the same user - as cached pages for the same user can create read/unread issues).

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

"Or even better - when generating the links - grab the unix timestamp, which would be a 10 digit number - changing every second, and append it as a variable to the URL. Then the URL would be different."

Thanks, that might be better.
Do you know where the URL is generated?

"Assuming they only get served a cached page if the URL (and variables in it) is exactly the same"

I think this is the case, because as soon as I move to another page (especially My Home) I do get the correct page.

Sanuk!

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
You shouldn't need to mess with your URL's like that.

In templates/ubbt_header.tmpl...

CHANGE THIS:

Code
<? //UBBTREMARK<br />echo <<<UBBTPRINT  


TO THIS:

Code
<? //UBBTREMARK<br />header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");<br />header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");<br />header("Cache-Control: no-store, no-cache, must-revalidate");<br />header("Cache-Control: post-check=0, pre-check=0", false);<br />header("Pragma: no-cache");<br />echo <<<UBBTPRINT  

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ah ha! Good call Twisty!

Sponsored Links
Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

Thanks, implementing now

Sanuk!

Joined: Jul 2001
Posts: 1,153
Likes: 83
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,153
Likes: 83
could this be implemented to only one page, and not all the pages?

for example - just the "My Home" page? Many people upload avatars and then change them to something else a day later. After they change them, their old avatar had been cached (by god knows what???), but they seem to forget about hitting that [F5] REFRESH key and all they get is their previous graphic.

Am I way off on this suggestion - Am i running the only site here who has a few users with this problem?


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
I know what you're referring to, and I find it a tad annoying as well.

I'll tinker around to see if I can come up with anything

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488

Joined: Jul 2001
Posts: 1,153
Likes: 83
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,153
Likes: 83
That did the trick - it was exactly what I was looking for! Sneeky, but it works like a charm!!!

Thanks twisty!!


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2338
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 27
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)