views:

34

answers:

0

I have one JS-file that is merged and compressed from several separate files. So when we start our app, there is only one http request for the JS-file which makes loading it really fast for all pages.

But, a lot of the code is jquery in document.ready(). It binds events and other code to elements on certain pages, but not all code is needed on all pages.

Now I was wondering if this is heavy on the browser? Or is there a way to make this more specific to only the pages the JS-code is targeting without having to split the files up again?