Should I split my javascript into multiple files?

前端 未结 5 1150
感情败类
感情败类 2020-12-30 19:20

I\'m used to working with Java in which (as we know) each object is defined in its own file (generally speaking). I like this. I think it makes code easier to work with and

5条回答
  •  囚心锁ツ
    2020-12-30 19:35

    It's depending on the protocol you are using now. If you are using http2, I suggest you to split the js file. If you use http, I advise you to use minified js file.

    Here is the sample of website using http and http2

    Thanks, hope it helps.

提交回复
热议问题