How Does Rails 3’s “data-method=’delete'” Degrade Gracefully?

The change they made in Rails 3 with these data- attributes wasn’t about graceful degradation, it was about unobtrusive JavaScript. In Rails 2, specifying :method => :delete on a link would generate a whole bunch of inline JavaScript that would create a form with a hidden input and then submit the form. That was the … Read more

What is the difference between progressive enhancement and graceful degradation?

They are almost exactly the same thing, but they differ in context. There is a class of browsers called “A Grade Browsers”. These are your typical audience members that (probably) make up the majority of your visitors. You’ll start with a baseline of these users. Call this best modern practices. If you want to enhance … Read more

Best way to detect that HTML5 is not supported

This is the technique used in Modernizr and basically every other library that does canvas work: function isCanvasSupported(){ var elem = document.createElement(‘canvas’); return !!(elem.getContext && elem.getContext(‘2d’)); } Since your question was for detection when it’s not supported, I recommend using it like so: if (!isCanvasSupported()){ …