javascript in body of website?
javascript in body of website?
- Started
- Last post
- 2 Responses
- freedom
is it bad to put javascript in the body of a website? found a new code I want to use, but seems weird not putting in the head.
- orrinward0
If it's for a single page I don't see why not. But if it's used again and again then it means it won't get cached.
Why not just save the JS as a .js file and load it into the head?
- uan0
if in body, make sure it executes after the page is loaded, or at least the part of the site you are adressing with js