require_once like for javascript ?

后端 未结 2 885
夕颜
夕颜 2021-02-13 21:14

I\'m currently searching a solution to not include two times the same .js

So my question is relatively simple, i\'m searching something like requice_once (.php) or #ifnd

2条回答
  •  醉酒成梦
    2021-02-13 21:18

    I would suggest that you use either require.js or head.js for this kind of thing. They are fully-featured and provide performance benefits as well.

提交回复
热议问题