IE8's AJAX can't get the data from php file-Collection of common programming errors
I use AWS with Apache, PHP, MySql.
and I tried Ajax.
ajax.php
$.ajax({
url: "back.php",
cache:false,
success: function(data) {
alert(data);
}
});
and
back.php
and
back.html
hi 100
ajax.php, back.php, back.html are in same folder.
Safari, Chrome, FF is working well. but only IE8 can’t get the data from back.php IE can get the success but IE alert(undefined). (data = undefined)
if I change url: “back.html” then it is ok.
and I move this source to other server, IE8 also Ok.
Who can fix it? shall i change server’s php env value?
Thanks.
…. ah, I tried to use this header, and not working.
header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", true);
header("Pragma: no-cache");
header('Content-type: text/plain; Charset=utf-8');
and i tried to
url: "back.php?foo=",
also not working.
Originally posted 2013-11-09 23:24:50.