Improve your skills

June 30, 2016

Place Scripts at the bottom of your page to Load Fast

Our primary goal is to make the web page load as quickly as possible for the user. When loading a script, the browser can't continue on until the entire file has been loaded. Thus, the user will have to wait longer before noticing any progress.

If you have JS files whose only purpose is to add functionality.

for example, After a button is clicked -- Go ahead and place those files at the bottom, just before the closing body tag. This is absolutely a best practice to boost your web page.

...
...
<p>The page load as quickly as possible.</p>
<script type="text/javascript" src="js/firstjs.js"></script>
<script type="text/javascript" src="js/secondjs.js"></script>
</body>
</html>






0 comments:

Post a Comment

Subscribe for Latest Update

Popular Posts