This answer assumes that History and Address Bar aren't an Issue. At least, not immediately.
Scenario
Julie is a victim of spousal abuse. She is on the internet searching for help, and she comes to your website: http://www.crisisprevention.com (fictional for this answer)
As she is perusing your site, she hears her spouse approaching the room rapidly. She panics. Fortunately, you have a nice, large button, fixed to the page as she scrolls.
She clicks this button and ...
It takes her to Google.com
I dislike this approach for the following reason: no one is going to believe that you are simply sitting in front of your computer staring at the Google search prompt. Believe me. I've tried it before.
I used to keep a tab open with the Google prompt, and if I was browsing off-topic at work stuff, I'd switch to the Google tab so that no one was the wiser. It worked...sort of. Until people started to question why I was staring at the Google search screen all day.
I've since started opening a tab with various work projects in different states. Usually, stuff I'm working on anyways in between browsing. So, now I'm actually getting some work done! It doesn't take a tech genius to figure out this approach, which is why @LeeGary's answer may be the best.
It takes her ... it's still taking her ... oh Internet connection problems
Here's a reality you need to be prepared for. Perhaps the Internet Connection gets interrupted at the moment she is panicking. The current content stays displayed on the page while she waits for the HTTP GET request to get content it can start rendering...only, no content is being retrieved. The Internet connection is disconnected. This could happen for any number of reasons:
- Spouse disconnected it.
- Server being contacted is under extreme load.
- Browser is running shy on memory.
- ISP is having issues.
- Dial-up connection/disconnect (yes these still exist).
- Computer is just slow.
- DNS server is down.
The reasons go on and on why the browser might choke when she hits the panic button, and it tries to move her to a new site.
Serve an Alternative Website Instantly
My solution suggests that you preload a website in the background of your site. Load it into a <div>
and hide it behind your normal site. If it's a large bit of content, then you might consider hiding it with z-index
instead of display: none
. This way it will be pre-rendered (I believe, could be wrong here).
Now, it doesn't matter if her Internet connection is down. She already has the content. There is no latency involved with an HTTP GET request. It simply displays immediately.
If address bar is a concern, you might still be able to mitigate that by serving an alternative website that correlates to your domain.
For example, take the fictitious (for this answer) domain: http://www.crisisprevention.com
You could serve up some alternative article that relates to say, solving the world hunger crisis.
The idea here is that it's the initial first glance that is the most damning. When the spouse walks in and he sees her navigating away to Google.com, with that panicked look about her, he's going to suspect something is up and be more inclined to investigate. Likewise, it could be even worse if she's caught in the act of trying to hide her actions because the HTTP GET request was slow or fails.