elsassph / haxe-modular

Haxe-JS code splitting, NPM dependencies bundling, hot-reload
116 stars 14 forks source link

How to avoid browser caching? #86

Closed djaonourside closed 6 years ago

djaonourside commented 6 years ago

Is there any mechanism to avoid loaded js the browser caching?

elsassph commented 6 years ago

Yes it's possible: https://github.com/elsassph/haxe-modular/blob/master/doc/library-usage.md#api

You can set Require.jsExt to ".js?c=" + Math.random() somewhere at the beginning of your code and all the requests will have the same random value appened to the URL.

djaonourside commented 6 years ago

thanks a lot:)