Multiple external JavaScript files using one script tag

前端 未结 3 1876
星月不相逢
星月不相逢 2020-12-18 10:36

I have seen on some websites they have one script tag but call multiple JS file e.g.

3条回答
  •  没有蜡笔的小新
    2020-12-18 10:56

    You need to write a server-side script that parses the script names from the URL or query string, and sends a single response with the contents of all of the scripts.

    Make sure to validate the script names to prevent attackers from reading arbitrary files.

提交回复
热议问题