Just been reading on Wikipedia
- Separation of functionality (the “behavior layer”) from a Web page’s structure/content and presentation[1]
- Best practices to avoid the problems of traditional JavaScript programming (such as browser inconsistencies and lack of scalability)
- Progressive enhancement to support user agents that may not support advanced JavaScript functionality[2]
In these days where Javascript libraries like jQuery rule the internet, why still take care of this Unobtrusiveness?
Point 2 and 3 about browser’s not supporting Javascript and inconsistency?
Which browsers?
If they are not in the IE 6.0+, FF 2+, Safari 3.0+, Opera 9.0+, Chrome range, frankly I don’t care! (I might care about Mobile though..)
Ok a user can disable Javascript, but do I have to make sure everything is ‘Unobtrusive’ just for that? I am asking this because I have by sumbit buttons (links actually because styling HTML buttons is a pain) triggered with Javascript. Is this a bad idea?
Just ask yourself the question: do I want to cater to casual computer users who don’t have Javascript enabled (many Windows XP installations esp enterprisy ones have Javascript disabled by default on IE for non-trusted zone). Is it OK to lose a small percentage of userbase who use such restricted browser settings? If the answer to both is yes, you might not really want to bother about “unobtrusive Javascript”.
I think the least you can do is show them a warning DIV at the top of the page (e.g. like the one used by Stackoverflow) that your site requires Javascript and won’t function properly without it; seems like a good compromise if you can’t go the unobtrusive way.