Friday, 29 January 2016

Brave users will not be able to access this blog

I am fundamentally opposed to any software which - as its missions statement, basically - censors a website's choice of content. This is what this new Brendan Eich project seems to be setting out to do as its raison d'ĂȘtre. Even if it's just the ads they choose to display:

It is not the place of a browser vendor to second-guess the materiel a website chooses to display. Especially when it means they replace that content with their own content.

As such I am shortly putting some JS in my main template, thus:

if ((window.navigator.userAgent.indexOf("brave") > 0)  && (document.location.pathname != "/2016/01/brave-users-will-not-be-able-to-access.html")){
    document.location = "/2016/01/brave-users-will-not-be-able-to-access.html"

This is based on my user agent string being:

Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) brave/0.7.10 Chrome/47.0.2526.110 Brave/0.36.5 Safari/537.36

I know user-agent sniffing is frowned upon as a solution to this sort of thing, but generally this is because one should be detecting browser features, not the browsers themselves. In this case I actually want to specifically identify the browser, so it seems a reasonable - if not very thorough - approach.

Obviously it's easy to circumvent, so do that if you like.

Also if anyone gets redirected to here and they're not using Brave, lemme know.

And you're entitled to disagree (or agree!) with my position on this, and you're more than welcome to put forward your case in the comments below.

If someone makes a compelling case why I should stop doing this, I will.

As it stands though: don't support this shittiness. If you're seeing this page because you are a "Brave" user... consider changing your browser decision.