location.reload(true); on a project a while back. I was working on a web-page which was destined to be displayed in a public area on a large screen, which unfortunately had a LARGE, static background image (not my design – promise!). The page needed to be reloaded fairly frequently, and I didn’t want the background image disappearing while it reloaded each time.
I have frequently used this function to reload a page automatically, but came unstuck recently when reloading a page with a large background image: the screen looked terrible each time it waited for the image to reload – the background images “disappeared” while it reloaded from the server.
I tried all kinds of trickery trying to manipulate the page header so that it would load the image from the cache. No luck.
“true", which, if you take the time to read the documentation, is the difference between reloading from the server (
true), or from the cache (