# [web] php/html on cell phones

## Recommended Posts

I'm writting a page that is viewed from a cell phone, the page is written in just plain html and PHP and everything works fine, the page is (for now at least) running from a Apace server from my own computer. I've saved the page and then load it up om my phone and it works fine, but when I reload the page again the phone doesn't load the page from the server it just loads it from the cache-memory in the phone instead. I don't know of this a phone-setting issue, but I don't think so, I don't get that problem visitning any other sites (with my phone). And my page works fine when I view it from Internet Explorer. Maybe it's some kind of Apace server-setting issue but then it woudn't work in Explorer either?. Anyone that stumbled upon this problem??? I don't know if this is the right thread to post this in, hell I don't even know if Gamedev is the right place for this, but whenever I get a problem you guys are the people to ask.. :) //The Asker.

##### Share on other sites
aidan_walsh    739
Have you tried specifying in the page not to cache?

<?phpheader("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1?>

##### Share on other sites
No I hadn't tried it but now I have and it didn't do the trick. Thanks anyway :)

##### Share on other sites
Cygnus_X    359
Sounds like its a cell-phone cache issue to me. It makes since that cell phones would try to cache as much as possible to keep from using bandwidth. I have no clue how to get around it though :\ Does your cellphone let you do a 'refresh'?

##### Share on other sites
markr    1692
A typical way of stopping the page being cached is using the "Expires:" header with a date/time in the past.

This should stop the page from being redisplayed without a refresh, according to the specs. However, there's no guarantee that a mobile phone even supports that.

Mark

##### Share on other sites
Sander    1332
Here's what I always use. Hasn't failed me yet, not even behind a series of proxies:

	header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');	header('Cache-Control: private, no-cache="set-cookie", pre-check=0, post-check=0');	header('Pragma: no-cache');