Problem: Chrome sometimes shows old versions of your webpage because it caches pages aggressively. This can break PHP updates, scripts, or CSS/JS changes.
Forces Chrome to bypass cache and reload the page.
Ctrl + Shift + RCmd + Shift + ROpen an Incognito window (Ctrl + Shift + N) and visit your page. Chrome ignores cached files in Incognito.
F12 or Ctrl + Shift + I).Append a unique query string to your URL:
http://your-server/page.php?nocache=123456
Using PHP, you can automatically generate a timestamp:
<a href="page.php?nocache=<?= time() ?>">Open Page</a>
Each visit creates a “new URL,” bypassing cache.
At the top of your PHP file, add:
<?php
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1
header("Pragma: no-cache"); // HTTP 1.0
header("Expires: 0"); // Proxies
?>
This tells browsers to never cache this page.
In the <head> section of your HTML:
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="0">
Works as a backup to prevent caching in browsers.
Combining #4 + #5 ensures Chrome always loads the latest page, even with PHP or JS changes.