Friday, April 29, 2011

What is Unobtrusive JavaScript?

If we look at the dictionary, the word obtrusive means "having or showing a disposition to obtrude, as by imposing onself or one's opinions on others". The synonyms are as interfering, meddlesome, etc.


Hence, unobtrusive is just the opposite of obtrusive i.e non interfering or meddlesome.
Unobtrusive Javascript as it suggest just means non-interfering or non-meddlesome javascript.

If we are able to remove the javascript from the source document and place it in an external file, then we are alomost there to say we have achieved unobtrusive javascript. The reason we stressed almost there is because "unobtrusive javascript" is a technique where we separate the behaviour layer from the presentation layer.




No comments:

Post a Comment