JavaScript Load Order

后端 未结 8 2391
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 06:38

I am working with both amq.js (ActiveMQ) and Google Maps. I load my scripts in this order


    

        
8条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 07:04

    Is there a way to make sure both scripts load before I use them in my application.js?

    JavaScript files should load sequentially and block so unless the scripts you are depending on are doing something unusual all you should need to do is load application.js after the other files.

    Non-blocking JavaScript Downloads has some information about how scripts load (and discusses some techniques to subvert the blocking).

提交回复
热议问题