location.reload(true);recently. I have a web-page which is destined to be displayed in a public area on a large screen, which unfortunately has a LARGE, static background image (not my design – promise!). The page must reload fairly frequently, and I don’t want the background image disappearing while it reloads 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.
Using Firebug, I noticed that when I refreshed the page using
“true", which, if you take the time to read the documentation, is the difference between reloading from the server (
true), or from the cache (