You could also set your server to sent a no-cache header. If you're running apache check this page: http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html#prevent-caching-with-htaccess
On 4 Οκτ, 00:36, "Javier G.R." <[email protected]> wrote: > On 3 oct, 23:21, Matt Sargent <[email protected]> wrote: > > > > > > > > > > > On 10/3/2011 3:39 PM, Javier G.R. wrote: > > > > Hi all > > > I have a problem with the function GM_xmlhttprequest that I will > > > explain... > > > > The script runs the function GM_xmlhttprequest to a file from an > > > external server. > > > When the server returns the file, the script compares the remote file > > > and the current script then it update or not the script > > > > But the problem is that, the browser does not connect to the server > > > and "download" the file, grabs the file from the cache (grabs an > > > outdate file) > > > > This is a very serious problem if the function is used for this task > > > GM_xmlhttprequest > > > > There are some options or methods to solve this problem? > > > > thank you very much and sorry for my very poor english > > > Sometimes you can add a bogus random parameter to the file name: > > myfile.txt?x=31415926. Never tried it with a text file, but I know > > people have successfully used it to ensure it pulls the image from the > > server, instead of the cache. > > This method is good to check if the script is already update, but in > case of need to update i cannot redirect to ...../script.user.js? > var=121412 becasue the scripts doesnt install, i need remove > parameters.. > > > Or, what I did in a similar situation, was to add a .htaccess file to > > the file's directory on the server, with instructions that any retrieved > > files are to considered expired within a few seconds of retrieval. The > > instruction set will vary depending on server software and other factors. > > This is good method, i will try > thanks -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
