only loads javascripts that are necessary for each page