3 ms·
Users stay on a website for more than 800ms. Wouldn't it be more cost effective (rather than convert/port a whole site to a new js lib) to rewrite your page in
by nicknyc 15y ago
Users stay on a website for more than 800ms.
Wouldn't it be more cost effective (rather than convert/port a whole site to a new js lib) to rewrite your page init JavaScript so it does not require a js lib at all (0ms)? Jquery would be async loaded by the time the user executes actions/buttons; if it had not loaded yet you wait, or show a loading icon, etc.
This porting/optimization adds no value to your users 6 months from now who are running a quad core nexus-razr-droid's browser that loads jquery in 300ms.
- pamelafox 15y agoGood point. For my particular app/use case, the user quickly opens the app, uses the camera, then closes the app and moves on -- which is why I'm optimizing load time. But even for that case, that technique is a great suggestion, and probably what I should have tried first. I'll try it next. :)
- bad_user 15y agoMoore's law is applied differently to mobile phones, as processing power is less important than battery life. And even if phones will get a lot more powerful, that's secondary to poor bandwidth, a problem that I bet we'll still have 4 years from now. I use jQuery because it makes Javascript usage sane. Without it I would hate my job.
- dingle_thunk 15y agoHave a play with CofffeeScript - perhaps it'll give you enough syntactic sugar that client-side frameworks become unnecessary.
- bad_user 15y agoCoffeeScript only takes care of syntax problems. It doesn't handle DOM traversing or other API related issues.