>标签已经有了,谁能告诉我什么时候应该使用脚本或资源加载器?以及您建议的负载是多少。
People are telling me that I need a script loading for web app, but I already have <script /> and <link /> tags already, can anyone tell me when I should use a script or resource loader? and What is the load you recommend.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
我假设他们指的是在需要时加载和执行 javascript 文件,通过不在 html 的 head 部分加载所有脚本来减少页面的初始加载时间。
不完全确定这是否是您要说的,您能否提供有关情况的更多信息?您的网络应用程序是否有大量 javascript 标签?
I'm assuming they are referring to loading and executing javascript files as and when needed, to reduce the initial load times of pages by not loading all your scripts in the head section of the html.
Not totally sure if thats what your getting out, could you give more information on the situation? does your web app have a large number of javascript tags?
我认为脚本加载器的要求是多个
I think the requirement of the scripts loader is for multiple <script src=""> tags in the html page, one of more of the scripts have the loading order required, like: the jquery.js must be loaded before the jquery-plugin.js. Another case is the scripts which will be loaded are different in different client devices, like the javascript run for desktop client will be different than the javascript run in the touch pad
当您正在开发单页应用程序时,JS 文件之间存在大量依赖关系。
When you are working on a single-page application with a lot of dependencies between JS files.