performance - What happens if the script tags are present after </body>? -


i mistakenly added tag after in code. inspect document in browser, added before .

my doubt happens if script tags present after ? cause performance or rendering problem?

depends on scripts do....placing javascript after closing body element can dramatically site, or can dramatically hurt site. you'll notice hurt part. typically put @ bottom fire off after pageload; helps wpo, , nifty form of progressive enhancement if chose go route. if you're making maps page fills entire viewport, you're not going want place map lib script or api call after body element in case. you're relying on scripts load content. other scripts not vital load, should defer maximize loadspeed. it's practice third-party scripts, in case go down, you're not tied script onload, bring down too. put analytics (third-party), , form validation scripts after closing body; pointless until document has loaded, why burden user?


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -