Fix defaultwebpage redirection caching
Add the following to to /usr/local/apache/htdocs/index.html
Code:
<meta http-equiv="Pragma" content="no-cache" />
Ideally a better solution would be to modify either httpd.conf or the local .htaccess file such that this header would be sent as a header, but at least sending it as an http-equiv would be better than what we have now.
Problem:
When a domain isn't properly configured, the document in /usr/local/apache/htdocs/index.html redirects the browser to /cgi-sys/defaultwebpage.cgi -- which itself is a pretty bad idea to begin with... but even if you like that, what's really problematic is that this redirection is cached by the browser for that session.
This means that when the domain is fixed (often done immediately in response to seeing that page), the user still can't see the correct page content because the redirection to defaultwebpage.cgi is cached client-side. So when the user types in the site URL, it immediately redirects to defaultwebpage.cgi without checking the server for an updated homepage.
The typical user response in this type of situation is to hit "reload" on the browser to get an updated page -- and browsers are programmed to skip this session cache when a reload is requested. But the problem here is that the page that gets reloaded is defaultwebpage.cgi rather than the homepage URL -- remember that the homepage URL immediately redirects to defaultwebpage.cgi, so you can't hit "reload" before the redirect happens.
The only solution is to close down all browser windows or manually clear the page cache, neither of which is something that the average shared hosting user would even think to try. The result is a lot of needless confusion due to a somewhat poorly thought-out design.
And this is absolutely trivial to fix. Just instruct the browser to not cache the redirect page, and you're done.
ليست هناك تعليقات:
إرسال تعليق