Reputation: 8811
I am conflicted between having my site validate as XHTML strict with my scripts in the head or including them at the bottom for faster page loads. What would SO do?
Upvotes: 1
Views: 115
Reputation: 1113
Putting scripts at the bottom is the way to go if you want to keep visitors on your site,
it's because a visitor will go away if they don't see anything happening and putting scripts at the bottom makes an illusion of faster loading
Upvotes: 1
Reputation:
XHTML validation doesn't matter unless you need your site to validate for some reason (e.g. you're reading it with an XML reader).
Putting JS at the bottom speeds up loading in many cases, and is the way to go unless you need to do something before the page is fully loaded.
Upvotes: 1