Benny Halperin
Posts: 0
Joined: Wed Oct 02, 2013 8:13 am

Force javascript (or style sheet) file to override browser's cache

Hi,

How can I force javascript file to override browser's cache?
Usually I would do e.g.

code<script src="myscript&#46;js?v=1&#46;2"><&#47;script>/code

But don't want to edit HTML file manually

Thanks, Benny

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Force javascript (or style sheet) file to override browser's cache

What you suggested above works... and probably the most popular solution. There are probably other ways. Have you tried searching on various JavaScript forums..?

Benny Halperin
Posts: 0
Joined: Wed Oct 02, 2013 8:13 am

Force javascript (or style sheet) file to override browser's cache

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Force javascript (or style sheet) file to override browser's cache

You would need to edit the source files.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Force javascript (or style sheet) file to override browser's cache

Hi Benny,

You can also add JD as External resources or use HTML component.

Benny Halperin
Posts: 0
Joined: Wed Oct 02, 2013 8:13 am

Force javascript (or style sheet) file to override browser's cache

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Force javascript (or style sheet) file to override browser's cache

Benny,

Yes. You can also add files via Create new - JavaScript

Benny Halperin
Posts: 0
Joined: Wed Oct 02, 2013 8:13 am

Force javascript (or style sheet) file to override browser's cache

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Force javascript (or style sheet) file to override browser's cache

I'll share this feature with the team. Thanks.

Benny Halperin
Posts: 0
Joined: Wed Oct 02, 2013 8:13 am

Force javascript (or style sheet) file to override browser's cache

Thanks Max. Awesome feature IMHO :-)

Return to “Issues”