Use minifyed js + put script tag at the end of the html pages
Script used to create minifyed js files for each html page

(You still need to replace the script tags in the html pages)