valtido Posted June 9, 2008 Share Posted June 9, 2008 Hi i know you can do this on ASP but not sure if you can do it on php. is there away that when someone visits a page it will force the browser to load the datafrom the server. sometimes if you update a page old data is displayed, which is not any help im finding it hard to explain but lets say if a picture is on blabla.php if i visit that page for the second time it will not reload a new image would be the same. is there a code that it will prompt to syncronise if that picture is different? if you dont understand what im going on about then pls ask Quote Link to comment https://forums.phpfreaks.com/topic/109390-solved-php-refreshing/ Share on other sites More sharing options...
valtido Posted June 9, 2008 Author Share Posted June 9, 2008 This is one of my favorite little scripts that I include on any page that I want to make sure isn't loaded from the cache of a user's browser. It came from member vasah20 a while back, and it has been requested so many times, I just decided to put it here. So thanks to vasah20, and without further ado... <% Response.Expires = 15 Response.ExpiresAbsolute = Now() - 2 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "private" %> i think this is an example of asp is it posible on php? http://www.tek-tips.com/faqs.cfm?fid=1034 full description Quote Link to comment https://forums.phpfreaks.com/topic/109390-solved-php-refreshing/#findComment-561080 Share on other sites More sharing options...
hansford Posted June 9, 2008 Share Posted June 9, 2008 header("Cache-Control: no-cache, must-revalidate"); you can review it at php.net Quote Link to comment https://forums.phpfreaks.com/topic/109390-solved-php-refreshing/#findComment-561081 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.