Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Force a page refresh on load?

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
Watch

user-7256

VIP Member
Impact
111
Hi all,

I have a page that is REQUIRED to have a forced refresh on EVERY LOAD to display a new random code so the form can be submitted okay.

I already have this:
PHP:
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");

But does not work. Is there javascript that can do this? It has to refresh all of the images, especially the one with the random code.

Thanks,
-Matt

UPDATE: I just added a javascript that reloads the page on load but it still does not work :(

UPDATE: Nevermind! Got it :p Works now... that's odd...
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
CatchedCatched

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

More data. Your data. See what is new
Major update
We have made a number of features available to provide sellers more data for their domains and inquiries, and greater access to the data...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back