JSon不在跨域工作(http://webcache.googleusercontent.com/) [英] JSon not workig in cross domain (http://webcache.googleusercontent.com/)
本文介绍了JSon不在跨域工作(http://webcache.googleusercontent.com/)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi,
I have cache problem with google:
I have the site <a href="http://www.niceonecode.com">www.niceonecode.com</a>
JSon not workig in http://webcache.googleusercontent.com/
推荐答案
这是因为javascript不允许跨域请求。要解决此问题,您需要使用跨域请求。
尝试下面的jquery
This is because javascript doesn't allow cross-domain requests.To overcome this you need to use cross-domain requests.
Try the below jquery
.ajax({url:a_cross_domain_url,xhrFields:{withCredentials:true}});
.ajax({ url: a_cross_domain_url, xhrFields: { withCredentials: true }});
尝试使用jsonp。
使用JSONP的Jquery跨域ajax调用 [ ^ ]
try following using jsonp.
Jquery Cross-Domain ajax call using JSONP[^]
这篇关于JSon不在跨域工作(http://webcache.googleusercontent.com/)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文