There is a need to have a takeover page when users visits the website e.g. http://www.domain.com and instead of displaying the contents immediately a splash page is displayed. They then have the option to visit the home page by clicking on a link.
-
Is there a way to do this without changing the code on the home page with the exception of including a javascript file that accommodates the requirements i.e. takeover the page with another HTML page?
-
Is there an example I can find that does the above?
You could do a DNS “rewrite” to an other IP and on the other Webserver you capture or simple copy/paste the original HTML contents and show it but also add this HTML splash notice.
But there is no way of adding a splash page without changing the content of the page or having access to the code.
If you have access to the HTML code, you can include a JavaScript file on which you have access, maybe also on an other server. Also add one noscript tag for visitors without JavaScript disabled.
Example:
How the file.js should look like you can ask an additional question. Or check on G.
The good thing with this “remote” JavaScript file is, you can remove the splash notice later from the file without touching the original code again.