Search code examples
javascriptjquerycompatibility

How much should I rely on JS


I have a form which has parts which are changed with jQuery. These parts will affect the price which the end user is paying, so has to be accurate. Should I do things like this without javascript? How many people have js disabled or don't support it?


Solution

  • I would venture to say that using progressive enhancement this shouldn't be a hindrance as those with JavaScript can have a richer experience without neglecting other users.

    But the finer point is that it depends on the logic involved and your client. If you have parameters such as tax, shipping etc. which depend on the User properties on the server-side (and assuming that you don't have access to these on the client) then it is worth the round trip.

    Look at your site analytics to understand your target audience - even within the same e-commerce shops the audience can vary from iPads to IE6 from site to site.

    Take a look at this SO question for how to detect users who have JS disabled How to detect if JavaScript is disabled?