If people start bypassing the DOM with canvas we will have a bigger problem than cosmetic filters failing: we will no longer be served the same kind of document. Or we will, but the content will be in an opaque region of it. If that happens the web is dead. People tried this before with flash and that smoldered for a while in the 90s but didn't last, so I'm not feeling all doom-and-gloom about it.
Aside: Standardized document formats are important. If rendering to canvas takes on as the defacto standard, it would cripple the web technologically.
As for bypassing the DOM, it's a question of when they do that, not if; for evidence, a lot of people tried that with flash already, and lots more try things like trying to block UserAgent context menu. Yes, these were ineffective, but they were (and still are) used by a lot of businesses.
Yes, I think we have a huge problem, because hoping that nobody decides to abuse technology for personal gain doesn't work. With new technologies like WebAssembly, we shouldn't be caring about technical benefits, but instead asking how the technology will be abused. If we give everybody tools to serve a non-document, then we shouldn't be surprised when non-documents are used. The only way to prevent this is to restrict the UserAgent to standards that can only be implemented as an open format, which is what HTML/CSS tried to do.
If you're not feeling the doom-and-gloom, you might want to watch PHK's "Operation Orchestra" talk, and consider that there are a lot of businesses that would love to serve up something closer to cable TV than the current environment where the user can control the rendering.
Use the Back button more often. Seriously, if I come across some site in a search result that requires running a Turing-complete language to get some textual content I'm looking for, unless it's the only site with that content (and in most cases it isn't) I'm just going to move on to the next one. If the content is really unique, Google's text-only cache seems to work well.
Incidentally this is not just a problem for users but for search engines' crawlers too - I believe Google's bot does execute some JS, but if it takes too much resources to render any content it gives up or demotes the site's rankings.
Unfortunately, I fear this is not a long-term solution as it lacks critical mass to effect any meaningful change. Too many sites already try various technical workarounds for ads and tracking purposes.
Contrary to the trend, not every site needs to be a web app. I feel like all the features of HTML5 are leading to something a lot like the Flash-only sites that blossomed during the late 90s and early 00s; just as inaccessible and user-hostile, except even more resource-consuming. The fact that it's built into the browser instead of a plugin and standardised does not make any difference to the end result.
I don't intend to single out Angular. I'm talking about any framework that renders empty pages. For example, http://www.meteor.com/ renders an empty body tag, and I doubt their homepage requires interactivity.
(I'm not talking about anybody that uses a framework but still renders an actual document)
I don't think the opaque nature of WebAssembly will defeat ad blockers because advertisers depend on the distributed infrastructure of the internet and that aspect stays the same whether browsers execute plain-text Javascript, or obfuscated minified Javascript, or obfuscated WebAssembly. Many (most?) obnoxious ads depend on ad networks to constantly generate realtime contextual ads for a particular web surfer. They also require the ad network for behavior tracking and monetizing. Therefore, fetching these external resources (urls) to "build the ad" will always be transparent to browsers engines and if they continue to provide "hooks" for ad blockers to detect these GETs, the filters will continue to be effective.
Another way to put it... there are 3 separate entities collaborating to deliver realtime ads: (1) content provider (2) the ad distrib network (3) the advertisers ... and following Conway's Law[1], the code snippets executed and fetched by the browser engine will mimic those business boundaries. That structure can always be detected by ad blockers.
On the other hand, if the ad is deeply "embedded" inside of content such as Fox Studios embedding a Pepsi ad for a XMen movie such that it's a contiguous chunk of WebAssembly, or continuous stream of "frames" for <canvas>, then yes, it will be harder to detect such "native advertising"[2]. In my mind, this scenario is closer to the "halting problem". This type of advertising doesn't appear to be the majority because the content providers don't like to burn their servers' CPU and network bandwidth "pre-assembling" the embedded ad before delivery. They'd rather take advantage of ad networks to make the cpu+network on users' desktops/iPhones assemble the ads on-the-fly.
VCRs back in the 90s had this feature, as TV ads couldn't be anything other than embedded directly into the content, and they weren't anything as powerful as the desktop PCs of the time (which were still only around 1% of the speed and memory of one today), so I think it's quite feasible to do such a thing if this happens in the future.
Further reading (this was possible 20 years ago!):
http://articles.chicagotribune.com/1995-10-13/entertainment/...
http://articles.philly.com/1995-07-18/news/25677718_1_commer...
http://www.hometheaterforum.com/topic/42956-vcrs-and-commerc...
Those networks will go away, a least as seen from the UserAgent, the moment advertisers figure out how to stuff it all behind a proxy. This will happen regardless of future technologies simply to make URL blocking harder. Conway's law is free to dictate the structure behind the proxy.
As for the halting problem, while it might be possible to detect some ads (it would obviously be an arms race), it will be hard to detect when the ads are sent in the same "binary" as the page content. This can be automated trivially, in a similar manner to how Javascript and CSS are assembled from multiple source files today.
Yes, and you have also said in another comment:
>when advertisers finally figure out that embedding into the actual document (like a data: URL today) is much harder to block.
Ad networks and advertisers have already been well aware of this for years.[1] However, they value personalized ad generation more than embedded ads. The content owners and ad networks value the realtime bidding of ad slots. The advertisers value delivering targeted ads to the most relevant eyeballs.
The part I think you're underestimating is the inherent value proposition of realtime ads that must be generated dynamically. The economics really favor the construction of those ads on the users' browsers instead of the server. The inherent boundaries in that make it easy for ad blockers to work effectively.
To merge all 3 entities' interests behind a monolithic "proxy" requires different economics because they now have pay for cpu & network bandwidth upfront to construct millions of ads. Now "Joe's Music Blog" has to send his blog post to the proxy for ad merging. That's a friction that's totally different from Joe just copy&pasting some ad javascript into his Wordpress template.
Your first post was about WebAssembly and that's a separate issue from ad proxies creating seamless ads.
[1]https://www.reddit.com/r/explainlikeimfive/comments/35rfhe/e...
Remember, I'm just speculating and suggesting caution. Nothing would make me happier than to be completely wrong about technologies like WebAssembly. I just think that it's a bad idea to underestimate the ingenuity of people that see dollar signs when they look at a new tool. If it I'm wrong and ad-blockers continue to work in a WebAssembly world, then there's no problem.
No matter how convoluted the WebAssembly bytecode, the browser engine still has to execute it and therefore it will ultimately know to go fetch "something" from AdsClearinghouseProxy.Com. If the browser engine knows that fact, the ad blockers know that fact as well. In that aspect, it doesn't matter whether the string "AdsClearinghouseProxy.Com" is obvious in plain-text Javascript or hidden in WebAssembly bytecode.
>technologies like WebAssembly. I just think that it's a bad idea to underestimate the ingenuity of people that see dollar signs when they look at a new tool.
It's not a technology problem and WebAssembly won't help the advertisers as much as you think. Check out the questions asked in that reddit thread. The advertisers already have the technical tools and know-how to do something about "empty ad boxes" when ad block is active. Nevertheless, they don't pursue the solutions. The issue is that they want to have their cake and eat it too. WebAssembly will not remove the immense friction of coordinating all entities to deliver merged ads that are undetectable by ad blockers.
You can't win the obfuscation game. At the end of the day ads run in the browser, and eventually they'll have to ask the browser to pretty please connect to "ad.doubleclick.net" and fetch something from there, be it a convoluted rendering script, an autoplaying flash video, or an animated gif.
Assume any site that uses WebAssembly is trying to pull some shit and dissallow it by default? That probably means turning of Javascript by default, but so be it.
Or just not go there?
Blocking elements with CSS (or whatever) will no longer be possible, and the Halting Problem says you're going to have a hard time trying to do similar blocking of the WebAssembly bytecode. You might be able to block a few image URLs for a while, but the ad industry will quickly migrate to any technique that has has a real effect of bypassing ad-blockers.
This is the problem with having a Turing complete language as a dependency for rendering documents; the only reason it hasn't become a big problem yet is that the technologies involved are fairly new and can be awkward to use for some use cases. With a framebuffer and a way to generically use any language, those speed bumps no longer apply.