views:

241

answers:

2

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.

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?

A: 

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.

powtac
This is a Facebook platform specific issue, the caching is done server-side on their part.
Brad
This ia not client side issue. :) Thanks Brad.
Murvinlai
+3  A: 

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

Brad
Thanks.. that's a good and simple solution. thanks a lot!!!
Murvinlai