考慮一個名爲compressed.js
的compressed Javascript
文件(包含少量合併的javascript文件)。我的<script src="javascripts/compressed.js" type="text/javascript"></script>
Afriend表示,將下面的代碼在頁腳將在現場性能方面會更好:性能方面的jquery壓縮
<div id="footer:>
<script type="text/javascript">
//Compressed js code is located here
</script>
</div>
</body>
</html>
他是對這個文件可以使用被稱爲?任何有關javascript performance
改善的答案和鏈接都非常感謝
[Javascript在HTML文件中的位置?]的可能重複(http://stackoverflow.com/questions/196702/where-to-place-javascript-in-a-html-file) –
你可以看看:http://developer.yahoo.com/performance/rules.html,尤其是'把底稿放在腳本部分 – JMax
[雅虎準則](http://developer.yahoo.com/ performance/rules.html) – Arindam