I am writing a Facebook application, Every time i reload the page i need to fetch the fb_all.js file from Facebook server.As this file is a must for initializing the application, i cant avoid it.
The size of the file is large and i feel that the page is getting slowed down due to this. Now if have downloaded the file and loaded it locally and everything is working as expected.
<script type="text/javascript" src="/fb_all.js" />
But is this kind of implementation really safe or will it cause any issues
It’s gonna cause updating issues – once FB fixes a bug in the SDK (or maybe even completely refactors something), you have to update your local version. But how will you know, when it’s time to do that?
If I was to embed the SDK locally (which I avoid, because it might lead to other issues as well), I would at least make it update itself, by setting up a cronjob that fetches the current version periodically or something like that.