I’m working for a business client who is providing information online regarding domestic abuse. As part of the web experience, they want to provide (opt-in) functionality that helps protect users from abusive partners, by allowing them to quickly exit the site and prevent those partners from easily seeing what they were looking at.
As part of this we want to prevent someone from using the back button to see what was being viewed.
I am aware that messing with browser behavior is generally a bad idea, and why that’s the case.
I am not specifically after JavaScript tricks to override the browser; I am seeking any solution that ideally prevents, or at least significantly makes more difficult, attempts to “go back” and see what was recently browsed.
For example, ideas so far:
- Opening the main content in a new window that was spawned via a script, meaning that we can use a script to close that window and spawn a new one with unrelated ‘safe’ content.
- Using HTTP redirects, so that when they exit they are sent on to another site we control which might forward them again – so that when someone goes ‘back’ they get the second site which auto-forwards to something else.
I’m not yet across the details of the implementation our vendor has so far used (I’m new to the project), but they do have something working that kinda works – however, when you go back the site we want to hide is partially rendered for a split second before the browser is sent on to a ‘safe’ unrelated site.
Please feel free to re-tag this question as appropriate.
1