ajax的请求和在地址栏输入请求有什么不同?
我有ajax请求 总是反回404 而在地址栏输入url 正常返回; 两具请求头为:
ajax:
Request URL:http://localhost:81/proxy/weibo.gxq.com.cn/game/getRealstock
Request Method:GET
Status Code:404 Not Found
Request Headersview parsed
GET /proxy/weibo.gxq.com.cn/game/getRealstock HTTP/1.1
Host: localhost:81
Connection: keep-alive
Cache-Control: max-age=0
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
X-Requested-With: XMLHttpRequest
Referer: http://localhost:81/doc/cow/index.html
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
Cookie: PHPSESSID=4ijp4pd5eu10cnljrd0sit9eu4; gxqSignId=d984aea7fcb3ac93; outer_referer=http%3A%2F%2Flocalhost%3A81%2Fdoc%2Fcow%2Findex.html
Response Headersview parsed
HTTP/1.1 404 Not Found
Date: Mon, 25 Nov 2013 15:22:47 GMT
Server: nginx/1.2.0
Content-Type: text/html; charset=utf-8
X-Powered-By: PHP/5.4.3
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Content-Encoding: gzip
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
地址栏输入:
Request URL:http://localhost:81/proxy/weibo.gxq.com.cn/game/getRealstock
Request Method:GET
Status Code:200 OK
Request Headersview parsed
GET /proxy/weibo.gxq.com.cn/game/getRealstock HTTP/1.1
Host: localhost:81
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
Cookie: PHPSESSID=4ijp4pd5eu10cnljrd0sit9eu4; gxqSignId=d984aea7fcb3ac93; outer_referer=http%3A%2F%2Flocalhost%3A81%2Fdoc%2Fcow%2Findex.html
Response Headersview parsed
HTTP/1.1 200 OK
Date: Mon, 25 Nov 2013 15:15:45 GMT
Server: nginx/1.2.0
Content-Type: text/html; charset=utf-8
X-Powered-By: PHP/5.4.3
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Content-Encoding: gzip
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
找了一晚上,都找不出问题所在. 求大神帮助
ajax:
Request URL:http://localhost:81/proxy/weibo.gxq.com.cn/game/getRealstock
Request Method:GET
Status Code:404 Not Found
Request Headersview parsed
GET /proxy/weibo.gxq.com.cn/game/getRealstock HTTP/1.1
Host: localhost:81
Connection: keep-alive
Cache-Control: max-age=0
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
X-Requested-With: XMLHttpRequest
Referer: http://localhost:81/doc/cow/index.html
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
Cookie: PHPSESSID=4ijp4pd5eu10cnljrd0sit9eu4; gxqSignId=d984aea7fcb3ac93; outer_referer=http%3A%2F%2Flocalhost%3A81%2Fdoc%2Fcow%2Findex.html
Response Headersview parsed
HTTP/1.1 404 Not Found
Date: Mon, 25 Nov 2013 15:22:47 GMT
Server: nginx/1.2.0
Content-Type: text/html; charset=utf-8
X-Powered-By: PHP/5.4.3
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Content-Encoding: gzip
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
地址栏输入:
Request URL:http://localhost:81/proxy/weibo.gxq.com.cn/game/getRealstock
Request Method:GET
Status Code:200 OK
Request Headersview parsed
GET /proxy/weibo.gxq.com.cn/game/getRealstock HTTP/1.1
Host: localhost:81
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
Cookie: PHPSESSID=4ijp4pd5eu10cnljrd0sit9eu4; gxqSignId=d984aea7fcb3ac93; outer_referer=http%3A%2F%2Flocalhost%3A81%2Fdoc%2Fcow%2Findex.html
Response Headersview parsed
HTTP/1.1 200 OK
Date: Mon, 25 Nov 2013 15:15:45 GMT
Server: nginx/1.2.0
Content-Type: text/html; charset=utf-8
X-Powered-By: PHP/5.4.3
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Content-Encoding: gzip
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
找了一晚上,都找不出问题所在. 求大神帮助
...全文
相关推荐
使用ajax实现无刷新改变页面内容和地址栏URL
本文主要详细介绍了使用ajax和window.history.pushState无刷新改变页面内容和地址栏URL的方法,需要的朋友可以参考下
Ajax Get、Post请求
Ajax Get、Post请求 Ajax Get、Post请求 Ajax Get、Post请求
ajax 同步请求和异步请求的差异分析
ajax 同步请求和异步请求的差异分析,需要的朋友可以参考下。
Ajax post请求跳转页面
主要介绍了Ajax post请求跳转页面的相关资料,非常不错,具有参考借鉴价值,需要的朋友可以参考下
html通过 ajax jsonp跨域请求接收和传送数据
html通过 ajax jsonp跨域请求接收和传送数据 使用HTML页面与后台跨域交互,获得后台数据或传输数据给后台


