Ben Ward

Tumblr 105343506

.

Makes me wonder what (if any) support they should get. Should I spend time making new dev work gracefully with *Block Products?

David Singleton

Flash. Obviously it’s always shit. But in those situations where it isn’t, or it’s necessary, how do you design for and support users who install Flash-blocking extensions? FlashBlock, or an ad blocker, or ClickToFlash will break some pages in unexpected ways.

But, users still want to use sites that use Flash for media playback, or silently as a component for advanced file upload (like Flickr). How far out of the way should applications go to accommodate a modified browser?

There are two sides to this. On the one hand, sites should all be built to handle a required plug-in being unavailable. That’s just straight up bulletproof web-design.

Some extensions introduce subtle behaviour alterations that require more robust methods to accommodate, but are not fundamentally breaking anything. On the other hand, others introduce behaviour that is simply lazy, crude, blunt and broken.

For example, if an extension blocks Flash content, that extension needs to ensure the fallback content for that Flash movie is available and visible. If an extension is in violation of how HTML is specified and expected work, users should take their pitchforks there. You, as the web developer, just need to ensure you have sensible, comprehensible fallback content, like you should be doing anyway.

ClickToFlash for Safari isn’t so bad, though. Yes, it hides fallback content (bad), but where you whitelist a site (as you would Last.FM, or Flickr), it will swap the real Flash player in. The twist? It takes a moment for the plug-in to do the swap. The result being that you cannot rely on a Flash object being available at the moment of window.onload. Your code needs to poll for the availability of your prerequisite component, rather than failing fatally at the first attempt.

This polling to handle an availability delay seems reasonable to me. It’s low cost, and it makes your code more robust in general.

Most of the time, given the blunt-instrument nature of most Flash-blocking extensions, the burden of compatibility is going to sit with the extension itself and the user that opts into using it. But, I think it’s important that graceful implementations like ClickToFlash are rewarded with a bit of patience and leeway. Flash is shit, after all.

You can file issues or provide corrections: View Source on Github. Contributor credits.