Page 1 of 2
Force javascript (or style sheet) file to override browser's cache
Posted: Sun Jan 05, 2014 5:33 pm
by Benny Halperin
Hi,
How can I force javascript file to override browser's cache?
Usually I would do e.g.
code<script src="myscript.js?v=1.2"></script>/code
But don't want to edit HTML file manually
Thanks, Benny
Force javascript (or style sheet) file to override browser's cache
Posted: Sun Jan 05, 2014 5:39 pm
by maxkatz
What you suggested above works... and probably the most popular solution. There are probably other ways. Have you tried searching on various JavaScript forums..?
Force javascript (or style sheet) file to override browser's cache
Posted: Sun Jan 05, 2014 8:03 pm
by Benny Halperin
I know it works. Asking if I can do it in Appery w/o editing the HTML manually, Otherwise I'll need to find another trick.
Force javascript (or style sheet) file to override browser's cache
Posted: Sun Jan 05, 2014 11:25 pm
by maxkatz
You would need to edit the source files.
Force javascript (or style sheet) file to override browser's cache
Posted: Mon Jan 06, 2014 7:37 am
by Kateryna Grynko
Hi Benny,
You can also add JD as External resources or use HTML component.
Force javascript (or style sheet) file to override browser's cache
Posted: Mon Jan 06, 2014 10:03 am
by Benny Halperin
Thanks Katya,
Good idea! To take it further (extremely maybe...) - Apperty can be a thin launchpad for all my external resources, even HTML....
Then the IDE would be primarily used for easy testing platform and bundling to AppStore.
Am I right?
Benny
Force javascript (or style sheet) file to override browser's cache
Posted: Mon Jan 06, 2014 12:07 pm
by Kateryna Grynko
Benny,
Yes. You can also add files via Create new - JavaScript
Force javascript (or style sheet) file to override browser's cache
Posted: Thu Jan 23, 2014 9:27 am
by Benny Halperin
Another idea for you: in Appery IDE, allow me to rename JS/CSS files including file extension.
Currently you allow to rename the file name only, and Appery adds the .js / .css extension. If I could rename the full name, then I could easily append it with e.g. ?v=1.2 and control my caching easily.
Force javascript (or style sheet) file to override browser's cache
Posted: Thu Jan 23, 2014 7:01 pm
by maxkatz
I'll share this feature with the team. Thanks.
Force javascript (or style sheet) file to override browser's cache
Posted: Thu Jan 23, 2014 9:29 pm
by Benny Halperin
Thanks Max. Awesome feature IMHO 