I have created several JavaScript files, that all have to rely on jQuery, and therefore must be loaded after. This means (or I think so) that they all have to be included in the layout, meaning that they will load on every page the user tries to visit.
I was wondering if checking the path was the "best" way to limit the pages the script actually run on.
I am using something like this at the moment;
if(path)
{
run code
}