Where should I declare JavaScript files used in my page? In <head></head> or near </body>?

后端 未结 12 949
后悔当初
后悔当初 2020-11-27 15:07

I was reading a tutorial and the author mentioned to include Javascript files near closing body tag () in HTML.

I was wonderi

12条回答
  •  难免孤独
    2020-11-27 15:39

    Google pagespeed have some nice explanation on how to parallelize downloading of scripts.

    Still their advice is to put them in the head of your page.

提交回复
热议问题