How to make a Adblocker detector in Javascript?

Web Design Best Practices: Does it make sense to place so much emphasis on building for and accommodating javascript disabled browsers?

  • Here in Brazil the percent of people with javascript disabled in their browsers is a paltry 0.3%. Google and other search engines render the html views for javascript based sites before indexing them. I imagine that tools for the blind such as JAWS do no yet work the same way the world's most important blind user (i.e. Google) works, but it is only a matter before those tools should also take into account javascript in site construction. After all, javascript is the reason that keyboard shortcuts are making their way into more sites, thus making them more accessible/usable for users disabled or not. Given all this, does it really make sense to focus on progressive enhancement when developing for javascript? A focus on building for individuals detracts from building for the group. Is this really desirable?

  • Answer:

    I'd say it all depends on your site.  Assuming you want to be properly indexed by the major search engines, you already have to build a version of your site for them that isn't built by user actions and javascript and can be followed by a spider.  For that purpose, it doesn't have to be even close to full functionality, but it does need to have important data in it and a sane representation that a search spider would understand. Beyond that, if I had a fairly dynamic site where the UI was largely built with javascript, I would not find it a worthwhile business tradeoff to build another version of the site that did not need javascript for users that had it disabled.  In most cases, it just wouldn't be a worthwhile business decision. I'd detect that JS was not functioning, offer a friendly message that javascript is required for this site and be done with it at that.  If it's easy to serve up a dumbed down version of the site, you could consider that, but the testing alone for that new version of the site probably makes it not worthwhile for the tiny amount of incremental users you would get. Try this yourself.  Go to Facebook with javascript disabled.  You will be able to read your newsfeed, but not do much else.  You can't even read your messages or comment on something in the newsfeed.  It looks to me like Facebook followed the axiom of "when javascript is disabled, display the data, but don't bother writing a whole new interface to allow the user to operate on it".

John Friend at Quora Visit the source

Was this solution helpful to you?

Other answers

I can't think of any good reason to cater to people who are basically opting out of the modern web.   They don't strike me as good customers.

Matt West

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.