There are some developers that will load all of the jQuery code for a site on every page, regardless of whether or not it’s going to be used there or not. (Don’t worry, if you’ve done this before, the good news is you can always change that habit!).
What you need to remember is that jQuery still has to take time to execute that code and if its not needed you can get a quick performance gain by checking whether you’re on a page which requires that script to run.
This can be achieved in many ways such as defining a class or ID unique to each page’s content and checking for it’s existence before you run it’s specific code or even through server-side processing if you want to run check on the filename being accessed.
As long as you can do your best to only load code that’s needed, you’ll get some quick performance boosts that may not have been there if you hadn’t thought about this in advance.