First, the same jsonp file can be loaded locally or from a server using the same functions.
I found this solution here -- An approach I like to use is to pad/wrap the json with an object literal, and then save the file with a .jsonp file extension.This will make the returned JSON data available to all other functions in your script instead of just the callback function.Next comes a simple function to retrieve your json by script injection.It is included as a reference to show the difference.This method may be a bit different from what you are used to seeing, but has many advantages.You're entitled to your opinion on whether this script is wrong. I shared my solution on this question, in the hope it would help someone else. Why not pass in the timeout value as a variable, based on the file you're loading? I can't believe how many times this question has been answered without understanding and/or addressing the problem with the Original Poster's actual code.