rahul_jjj Posted December 1, 2008 Share Posted December 1, 2008 I have a written a code in php with ajax for login validation..I have a login.php from where I am getting the request for Ajax and call the ajax.php something like this " xmlHttp.open("GET", "ajax.php", true); " I get the output as desired but when I change the content in ajax.php say for example if I change a string username as User it is not reflected when I refresh the page. It works when I use a new window. Browser used : IE Do I need to enable any browser setting to make this work in the same window. Anyone advise Link to comment https://forums.phpfreaks.com/topic/134985-browser-issues-with-php/ Share on other sites More sharing options...
Adam Posted December 1, 2008 Share Posted December 1, 2008 Try adding a random number to the file name to stop the browser caching the contents.. 'ajax.php?rand=' + Math.random() Link to comment https://forums.phpfreaks.com/topic/134985-browser-issues-with-php/#findComment-703006 Share on other sites More sharing options...
gevans Posted December 1, 2008 Share Posted December 1, 2008 add no cache headers to the top of ajax.php <?php header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); //rest of your code ?> Link to comment https://forums.phpfreaks.com/topic/134985-browser-issues-with-php/#findComment-703021 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.