Bob Fornal
Bob Fornal’s Articles


Bob Fornal’s Articles

Hidden Navigation for Domestic Violence Sites

Hidden Navigation for Domestic Violence Sites

Bob Fornal's photo
Bob Fornal
·Dec 1, 2020·

4 min read

So, recently I had the incredible honor to work with an individual who was a Survivor of Domestic Violence. This was all part of a business "hackathon."

Setting aside the ideas that came out and amazing projects that I got to see, there was one concept that had me intrigued.

The Project

Hiding Navigation

Assuming that the people visiting the site are in some dangerous scenario, I wanted to know if the actual traffic can be hidden. Here, I was thinking of minimizing the cached files and browser history.

The first thing I looked into was disabling the cache.

Checking with a co-worker, I found that not caching files is easy, but we had to be careful of utilizing CDNs ... their content would be seen, regardless of how our server handled caching.

Next, I wanted to see if I could minimize the site's "footprint" ... which I am describing as seeing the pages viewed in the browser's history.

After a lot of research here ... I found almost no good results.

There is no easy way to clear be browser history while leaving or after having left a site. I did come up with a somewhat reasonable solution. It's a bit of a hack and depends on the user to navigate within the site (not using the address bar, bookmarks, or back and forward options.

The Solution

What I came up with feels a bit hacky, but it does work.

navigate(event, location) {
  return false;

What is happening here is that the location is being replaced. This minimizes the number of times our site is listed in the history. And, if this pattern is used to leave the site, the new address overwrites the old one ... and our site is gone from the browser history.

With a navigate like this, anchors can be adjusted, as follows.

<a href="#" onclick="anchor.navigate(event, 'index.html')">Home</a>
<a href="#" onclick="anchor.navigate(event, ``)">Off-Site</a>

Basically, the code replaced the last cached link in the browser's history, ensuring that the site is only seen once.

Again, if the user navigates off the site using a link setup like the second one above, there is no reference to the site in the browser's history.


While this is not a wild amount of code for an open-source project, what it is doing is powerful and worthy of some exploration.

Here is the NPM project, the example site, and the GitHub Repo.

My hope is that this code allows for additional safety and potentially inspires other code along the same lines.

Share this