SURFscz / SRAM-deploy

Deploy scripts for the SCZ
Apache License 2.0
5 stars 5 forks source link

When client code is updated, browsers keep using old cached versions #291

Closed baszoetekouw closed 2 years ago

baszoetekouw commented 2 years ago

I'm not sure what is causing this, because the actual js asserts get a unique name for each new release. Maybe the actual pages (https://test.sram.surf.nl/profile etc) should be set to no-cache?

oharsta commented 2 years ago

@baszoetekouw The easiest way to invalidate all client-side cookies is to change the secret_key of the SBS server each time a new version is deployed. This will cause a 401 on every subsequent client request and this will force a new login (with SSO probably) resulting in a refresh of the JS / CSS.

baszoetekouw commented 2 years ago

Sounds like a good solution; should be easy enough to add the version number in the secret

FlorisFokkinga commented 2 years ago

This bug occured with at least one institution after the last update. This should be fixed in the next release.

baszoetekouw commented 2 years ago

Fixed in https://github.com/SURFscz/SRAM-deploy/commit/29c5580c39e09c1c498fe5dea3bbc5702248df64

baszoetekouw commented 2 years ago

Gedrag al gezien op test. Werkt.