clarin-eric / LRSwitchboard

DEPRECATED - Please see https://github.com/clarin-eric/switchboard for latest version - Code Repository for the Language Resources Switchboard of CLARIN
Other
1 stars 0 forks source link

Less aggressive caching #2

Closed twagoo closed 7 years ago

twagoo commented 7 years ago

A suggestion for the currently rather (sometimes problematically) robust caching of the LRS code: maybe try setting some HTML headers to prevent the clients from caching it? See https://stackoverflow.com/q/7413234.

Or you could use HTTP headers if you have control over those.

Or possibly the best solution: add a query parameter with a unique value to the location of the script file. Maybe at build time the Git revision can be inserted? Or otherwise a checksum of the file itself? For example:

<script src="bundle.js?v=b44d38d6d67924bdae6e9bb2d6b46b580d68392b"></script>
claus-zinn commented 7 years ago

I've added a querying parameter as suggested by twagoo above. This should do the trick.