JavaScript - Cache bookmarklet but always load the latest version -


i'm working on javascript bookmarklet lets users send link website. possible cache bookmarklet reload if new version available? (maybe htaccess?)

edit: bookmarklet:

javascript:javascript:(function(){new_script=document.createelement('script');new_script.src='https://www.example.com/folder/bookmarklet.js?v=1';document.getelementsbytagname('head')[0].appendchild(new_script);new_script.type='text/javascript';})(); 

the nature of bookmarklets "cache" irrelevant them: exist entirely within browser's bookmark storage, there no server call (unless write 1 part of bookmarklet code).

you have bookmarklet load , check version string website using ajax or jsonp.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -