I am modifying some JSP files, and every time I upload a new version, if people don’t update the cache, the styles are not rendered as they should be; it is looking not good and without styles applied.
To solve this problem, I have followed an example from Stack Overflow that adds a numeric value to the CSS file, preventing it from being cached in the browser. The specific link I’ve seen is this one:
https://wpreset.com/force-reload-cached-css/
But I’ve found that whenever I press F5 or navigate to other JSP’s that apply the same stylesheet, the files that are part of that CSS file are always seen just before rendering. I added a GIF with a dummy example to exhibit what I mean:
Animated GIF demonstrating the problem
How could I avoid this?
2
Answers
I have already been able to solve it.
In the end I have chosen to nest inside a window.onload, the document.ready like this:
And change the visibility of the html document. I have omitted the rest of the code, but you can get an idea. Many thanks to Robert Bradley and Adam for shedding light and helping me.
Would something like the following help?
|
Like it is used here.