开发者

How to tell Facebook to remove Javascript cache

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜