设置一个名为 headers 的参数 参考代码: // attempt to make an XMLHttpRequest to indeed.com // jQuery 1.6.1 and Chrome dev 13.0.767 function makeRequest() { alert("inside makeRequest()"); var settings = { type: "GET", url:URL+"?"+REQUEST, da
ajax请求node.js接口出现了如下的错误: XMLHttpRequest cannot load http://xxx.xxx.xx.xx:8888/getTem?cityId=110105&date=2015-03-04. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. 百度了一下,原来是
IIS7.5或者IIS7.0开启GZip压缩方法:打开IIS,在右侧点击某个网站,在功能视图中的“IIS”区域,双击进入“压缩”,如图下图: 分别勾选“启用动态内容压缩”和“启用静态内容压缩”.这样最通用的设置GZip压缩就完成了. 静态内容压缩和动态内容压缩的区别静态内容压缩:压缩的静态响应可以缓存到磁盘上,供多个请求使用,同时不会降低 CPU 资源的性能.对于下一个请求,可以从磁盘检索压缩文件,由于 CPU 不必再次压缩文件,从而提高了性能. 动态内容压缩:压缩动态应用程序响应会影响 CPU
在<Pragmatic Ajax A Web 2.0 Primer >中偶然看到对readyStae状态的介绍,感觉这个介绍很实在,摘译如下: 0: (Uninitialized) the send( ) method has not yet been invoked. 1: (Loading) the send( ) method has been invoked, request in progress. 2: (Loaded) the send( ) method has complet