This question has been running through my head for quite a while. If for example only the index page uses a carousel, does it make sense to include it on all the pages? For me it doesn't, but most of the WordPress plugins and themes don't take this into consideration, and they load the scripts on all pages. Is there something I am missing?
Furthermore, while I was reading Grunt's minifying process, it concatenates all the scripts used on the site altogether then minifies them, which in fact includes any and all the javascript including the ones used only on one page. Is that efficient? Grunt for People Who Think Things Like Grunt are Weird and Har. Is compressing makes up for all the extra codes being used?
It doesn't really matter because after the first page load the JS file will be cached on the browser anyway.