My developer says JS files are in header and hence not optimal and slows down the site

Is there a way to move the JS to the footer so the popup doesn't slow down the site?