I noticed if I use ngRoute
and make a single page application (SPA) using AngularJS, and then load 2 subpages: main.html
and second.html
, then inside of Google Chrome's debug console, I will see that when I first load the SPA page, it will load main.html
, and when clicked on a different link on the SPA, it will load second.html
from the network , but will stop loading main.html
or second.html
afterwards.
In the HTTP response header, I do not see an expiration value and the HTTP request header actually has a pragma: no-cache
.
Update: in the comment, @sdfacre suggested it is due to $templateCache
caching the pages, so what if it is Best Buy, closing down the site and 1 hour later, refresh its contents for a Christmas sale, or a Target Store website, refreshes its design in a monthly website overhaul, then how can the SPA forces a re-load of subpages or all pages, if some users actually might have the page open a few hours ago and still have the old version of the SPA in the browser?