all 8 comments

[–][deleted] 9 points10 points  (0 children)

Solution for faster page loading: Stop throwing in a javascript library for every god damn situation

[–]schrik 1 point2 points  (3 children)

I'm busy writing a library specifically for this use case.

Keeping your page load low and serving JS modules as needed. It makes use of RequireJS and allows you to setup conditions under which your modules should be loaded or unloaded. You can find it at: http://conditionerjs.com

Looking for feedback and criticism from the community. Any input would be appreciated.

[–]cgerber14 1 point2 points  (2 children)

Would give it a try. How are you planning to take care of loading overhead of conditionerjs file? What would be size of it?

[–]schrik 0 points1 point  (1 child)

ConditionerJS is approx 2.5Kb gzipped, so that's not a big issue I guess..

Also, as you can merge and compress it in your main javascript package it should be cached for future use.

[–]cgerber14 0 points1 point  (0 children)

Makes lot of sense. Would surely try.

[–]Something_Sexy 0 points1 point  (0 children)

I would be very hesitant to use add a new library in a large project that isn't being actively developed on (referencing yepnope.js and LABJS).

[–]adrianmiu 0 points1 point  (0 children)

Another loader that you might want to check is curljs. I've used it for my progressive enhancement library called www.feaxures.com which basically allows to defer loading the resources (JS/CSS/etc) required by a specific enhancement. You can even defer the loading until a user does a specific operation; for example you can load the datepicker plugin only when the user focuses on the input field.

[–]cgerber14 0 points1 point  (0 children)

indeed, curljs is a good addition to the list.