2 ms·
Let's say your JS is hosted on a different domain from your html (quite a common scenario) and that domain can't be reached (for any of the many possible reason
by oneeyedpigeon 13y ago
Let's say your JS is hosted on a different domain from your html (quite a common scenario) and that domain can't be reached (for any of the many possible reasons). Or a bug is introduced into the javascript (which happens a lot). In each case, your approach results in a broken page, whilst a fallback approach still works perfectly.
Re: personal preference - have you never heard the saying 'the customer is always right'? No business in its right mind would purposefully turn down money from a bunch of its customers just because they happen to have a personal preference which can easily be accommodated.
Note that a web browser without javascript support doesn't fail to be a 'working browser' just because you say so.
Note that I am not saying you must do this on your personal blog, or that Javascript isn't a very useful feature of today's modern browsers. Just that it's good engineering practice to be inclusive and to handle exceptions gracefully.