PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 24th, 2000, 04:05 PM
xMonkey xMonkey is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Posts: 16 xMonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I can't seem to get any browser to stop caching things.

I've tried it with the following PHP.

<?
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache"); ?>

and with the following HTML

<META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT">

And It just keeps caching.

Does anyone know how to make a browser not cache your content.

Thanks,
I usually don't get frustrated but this is making me go bald.


Reply With Quote
  #2  
Old March 28th, 2000, 09:10 AM
Ramon Ramon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Location: Helden,Limburg,The Netherlands
Posts: 33 Ramon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Hi,

If it is not the start page of your site you can use some header info to make the browser load the document every time.

You can use the current time in miliseconds from 1970 for instance. Since this makes a different URL every milisecond the browser does not take the document out of the cache.

It looks a little like this:
DocumentURL?time=123456

The problem is that when someone enters the page from a bookmark or search engine, the document can still come from the cache. And it is not useful to do this when the document is the starting page. Although you could use some meta refresh function to accomplish the same thing. Anyhow you get the idea!

Greetz,
Ramon



------------------
Ramon Litjens
Boradoli Web Design
(www.boradoli.nl)

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Cache

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap