且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

EXTjs:如何从ashx页面读取rss feed到商店?

更新时间:2023-11-27 20:12:10

您的问题很可能是浏览器因为相同的来源政策,因此阻止您提取Feed。

Your issue is likely that the browser is preventing you from fetching the feed because of the same origin policy.

使用传统的AJAX调用,您只能与您的网页托管的网站进行通信(除非您调整设置以允许)。

With a traditional AJAX call you can only communicate with the site that your page is hosted on (unless you adjust your settings to allow it).

您将需要在您的网站上设置一个代理页面,该页面将获取并回显数据,或者通过类似雅虎!管道将XML转换为JSON ,并使用动态脚本标签,不具有相同的起始策略限制。

You will either need to setup a proxy page on your site that will fetch and echo the data, or run it through something like Yahoo! Pipes to convert the XML into JSON and use a dynamic script tag, which does not have the same origin policy restrictions.