Hey all,
I am currently creating a website and it has a generic ID number generated by the date() command in php my problem is, whenever I want to change this ID I have to refresh the page, (navigating to the page does not change it). how can I make it so that whenever the page is displayed the new generic code shows up?
Also I have already tried the <?php Header(Location: [url]) ?> method and it did nothing either
Thank-you in advance
Regards
Cameron
PHP refresh content
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
There are many possible solutions. One is to make the URL unique so the browser has less of a chance to cache the page, another to tell the browser not to cache the page via header(). We've had several threads on "no-cache" headers, so I'll talk a bit about the unique URL, which is quite simple really.
The page(s) linking to the page can include a randomized argument such as that returned from uniqid(), mt_rand() or some other functions available in php.
The page(s) linking to the page can include a randomized argument such as that returned from uniqid(), mt_rand() or some other functions available in php.