开发者

How to tell Facebook to remove Javascript cache

开发者 https://www.devze.com 2022-12-19 02:53 出处:网络
So, i m working on a facebook app. It has javsacript.Of course, FB will sanitize the javascript. Of course, FB cache the javascript.

So, i m working on a facebook app. It has javsacript. Of course, FB will sanitize the javascript. Of course, FB cache the javascript. Whenever I upload the js file, it takes a while or a long while for the new javascript to take affect.

开发者_JAVA技巧

That's annoying for development. :(

so, anyone know how to notify FB (vai API or some FB js call) to refresh the cache or take the javascript & replace the one in the cache?


You need to append a modifier to the end of the call to trick their cache into thinking it's a new file. (You can use an internal version number or the unix epoch time of its last modification, for example)

file.js?mod=12345


Use the Firefox plugin Web Developer and there disable caching in your browser!

If you really want FB to refresh your JS files, you have to rename them every time you change something.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号