So I'm using a WAMP server and Chrome to test a website I'm building and I often have an issue where I change the content of files and reload the page (even in a new window), and don't see the changes. Viewing the code in the debugger I still see the old code from before I saved out the changes.
My fix to this problem is that whenever it happens (which seems random) I have to clear my browser cache and restart the WAMP server, but this is a royal pain and I'm wondering if anyone knows a better solution (maybe some setting in Chrome or WAMP that I'm missing) to avoid this constant speed bump.
ANSWERS:
With jQuery (by Willy Wonka):
$.ajaxSetup({cache: false});
Without jQuery (by cowgod):
<?php
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>
disabling the browser cache in php or using javascript
Thanks Willy Wonka for pointing me in the right direction.