putting javascript after </html> tag

gtmetrix showing me to defer parsing of javascript for SEO Purpose of my website

for that i searched the forums, google etc., then i got that it should be placed after tag in my template head.php file

but if i cut and paste any javascript file call to head.php file and if i unpublished that specific module then also it will load or not?

and there are many javascript files in modules which are loading on specific condition checking and if i put that files by default in head.php, will it cause any problem?

and i'm using joomla 1.5 framework

Please help me, i'm stucking on this problems since many days but not getting proper solution.

Thanks, Rahul


SEO crawlers don't care about where you place your javascript. It always looks trough the whole page for information. Lots of people add javascript in the head so it's located in the same place.

The best place for putting javascript is at the end of file, because of the users that visit your page. Browser can render your page while javascript is still not needed(most of the pages). Also javascript should be put in its own file, because browser can cache .js file request. That way your page loads faster and uses less bandwidth.


Yes. SEO crawlers not cares about where your JS and other service code placed. They looking at time to last byte of the .html. BUT! After crawling, your data learning by google filters, that checking links, texts and can check performance. Also they сan check "load completed" and "document ready" times. Defer load can help your SEO, but I really not tested it. New Wordpress CMS uses this tactic.

链接地址: http://www.djcxy.com/p/71524.html

上一篇: 从HTML中删除头标签

下一篇: 在</ html>标记之后放置javascript