Force custom files to ignore cache (once)?
I have customizations in the customspace folder that sometimes need an update before a new version of the portal is pushed out. The problem with this is that everyone's browser will keep an older version of that file cached. Appending session.staticFileVersion to the end of the filename doesn't help here, because it hasn't changed.
So how should one ensure that updated customizations get pulled in by users' browsers in a timely manner? Is there a way to increment staticFileVersion by adding a number to the end, etc.? Is there a better suggestion?
Best Answer
-
Geoff_Ross Cireson Consultant O.G.
Hi Tom,
If you increment the bin\Versions.json file, this should force browsers to check for a new versions of all files.
However, there is a small chance you could increment it to the same number as the next portal upgrade you perform, meaning the new upgraded files will not be pulled by the browsers.
My secret tip here (don't tell anyone) is to decrease the number instead! The portal doesn't care, as long as it changes, the browsers will know there are new files to find. When you next upgrade, it will go up again and you can start to decrease from there.
Geoff
5
Answers
Hi Tom,
If you increment the bin\Versions.json file, this should force browsers to check for a new versions of all files.
However, there is a small chance you could increment it to the same number as the next portal upgrade you perform, meaning the new upgraded files will not be pulled by the browsers.
My secret tip here (don't tell anyone) is to decrease the number instead! The portal doesn't care, as long as it changes, the browsers will know there are new files to find. When you next upgrade, it will go up again and you can start to decrease from there.
Geoff
Thanks! I had incremented one in InetPub\CiresonPortal and it had no effect. I suppose it was a decoy? :)
Shhh, don't let everyone know!
🤐