Contact Us

 Admin User     Feb,08 2017

Place Scripts at the Bottom of Your Page

Placing JavaScripts at the bottom of the page is a good way to makeother things of the page download faster.

Keep in mind — the most important goal is to make the page load as speedily as achievable for the user. As soon as load script statement is encountered the browser tries to download and becomes unresponsive until the whole file has been loaded. Therefore, the user will have to wait longer before noticing some development or rendering in the page.

If you have JavaScript (JS} files whose only intention 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.

Superior way

<p>MyContent</p>

<script type="text/javascript" src="js/genral.js"></script>

<script type="text/javascript" src="js/event.js"></script>

</body>

</html>