Google Ajax Feed缓存

时间:2015-05-12 07:14:52

标签: ajax caching pinterest google-feed-api

我通过Ajax调用获取Pinterest板源。但是,结果中看不到墙上的变化。我已经搜索了解决缓存问题的解决方案。但我似乎在实施它时遇到了问题。

//url to the feed
var url = 'http://pinterest.com/' + this.options.username + '/feed.rss?nocache=' + (new Date).getTime();

///Google service
var api = "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=" + encodeURIComponent(this.url) + "&num=" + this.options.limit + "&output=json_xml&callback=?";

这会产生错误:

Uncaught TypeError: Cannot read property 'feed' of null

{"responseData": null, "responseDetails": "Feed could not be loaded.", "responseStatus": 400}

当我省略'?nocache ='+(新日期).getTime()时。已加载缓存的Feed。

0 个答案:

没有答案