1

In a Mobile Website if a JavaScript can enhance UX but will make the page little slower to load, is it ok to use javascript?

Or we should always give preference to speed specially on mobile?

3
  • 1
    Is it possible for you to instead progressively enhance the website, i.e., load the basic site (for quick rendition) and subsequently load additional JavaScript etc. used to enhance the UX?
    – jensgram
    Sep 8, 2011 at 9:02
  • @jensgram - you mean Loading page data before and javascript after? by keeping javascript file at bottom of the page? Sep 8, 2011 at 9:07
  • Yes, that's one way to do it. See Vinko Vrsalovic's answer.
    – jensgram
    Sep 8, 2011 at 9:29

3 Answers 3

1

Of course, it depends on what exactly are you enhancing and at what cost. But the ideal solution would be to load fast a minimally usable version and enhance it progressively, for example via loading Javascript on demand

0

Kind of impossible to say. You have to weight the advantages that the javascript gives the user to the added size of the total page. In general though - javascript is light weight and can be used to partially load data with AJAX - which in the end will make the total experience load faster.

0

You can also combine @vinko-vrsalovic answer with Application Cache
That way the file is only loaded at the beginning and when you update it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.