Tips and tricks for minimizing page load time when using JavaScript