I am having some kind of strange problem which i am not able to debug.
Our application servers needs the downtime and hence we have built the temporary xhtml page for our website which will give the message that temporary servers down. Our plan is that during downtime we will rename our original index.xhtml page to something like index-original.xhtml and downtime.xhtml to index.xhtml. So during downtime we can show the website temporary unavailable page. And we will revert these changes when downtime is over
Now when we were testing this renaming thing, we found out that even after renaming the downtime page to index.xhtml and preserving the original index page, browser was still loading the original index page. We have disabled the caching by using following code in login filter.
res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
res.setHeader("Pragma", "no-cache"); // HTTP 1.0.
res.setDateHeader("Expires", 0); // Proxies.
res.setHeader("Access-Control-Allow-Origin", "*");
What I found from the server logs is that, the request is hitting the server, but somehow browser is still showing the old page. When i checked in the browser's developer tools, i found that page is not getting loaded from cache and it is coming from server. But somehow server returning the old page after renaming
After one server restart, the renamed downtime page gets dispalyed.
The same server restart required when we want our original home page page back after the downtime is over.
My concern is, why server restart is required for this renaming to work? Shouldn't it load the renamed file directly as the request is hitting the server.
I get the following messages ocassionally in chrome developer tool is
Document was loaded from Application Cache with manifest https://www.google.co.in/_/chrome/newtab/manifest?espv=2&ie=UTF-8
Application Cache Checking event
Application Cache NoUpdate event
But in the network section of developer tool, it is not showing that page is loaded from cache.
I am thoroughly confused here as i am a junior developer.