Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

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?

share|improve this question
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 '11 at 9:02
    
@jensgram - you mean Loading page data before and javascript after? by keeping javascript file at bottom of the page? –  Jitendra Vyas Sep 8 '11 at 9:07
    
Yes, that's one way to do it. See Vinko Vrsalovic's answer. –  jensgram Sep 8 '11 at 9:29
add comment

3 Answers

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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