Minor improvement things
-
Hi Frank,
Namaste!
There’s a session storage trick which improves second load.
What you do is at the bottom of the page add to JS and run lCSS only if session storage is false and then set it.
if(! sessionstorage.aocssloaded) { ... lCSS( ... ) sessionStorage.aocssloaded = "true" }
And in the head do this in JS:
if (sessionStorage.aocssloaded) { document.write('<link href .... >') }
In effect, CSS is loaded deferred on first visit, but loaded in the head on second visit (picked up from browser cache).
(Additional code would be to test if browser allows sessionStorage).
Possible to add?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Minor improvement things’ is closed to new replies.