Murvinlai
Murvinlai

Reputation: 2336

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.

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?

Upvotes: 2

Views: 2193

Answers (2)

Brad
Brad

Reputation: 572

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

Upvotes: 5

powtac
powtac

Reputation: 41050

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.

Upvotes: -3

Related Questions