[Greasemonkey] JS Library Question

Bill Donnelly donnelly at snowcrest.net
Tue Jun 27 16:35:27 EDT 2006


on the other hand, I would want it cached for speed. (I think)
have you discovered that it doesn't recognize a new
version of the file unless you did it this way?

Philip Friedman - Auto Europe wrote:
 > I do something like this:
 >
 > GM_xmlhttpRequest( { method:'GET'
 >   , url:'http://<path to javascrip>/lib.js'+'?'+Math.random()
 >   , onload: onLoadLib
 >   } );
 >
 > function onLoadLib(rsp) {
 >   eval(rsp.responseText);
 >
 >   ... Your code with library calls here ...
 > }
 >
 > Appending the '?'+Math.random() prevents the library from being cached.



More information about the Greasemonkey mailing list