在页面中加载资产的顺序 [英] Order of loading of assets in a page

查看:79
本文介绍了在页面中加载资产的顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的问题..如果我在我的页面上:

Simple question.. if I have on my page:

<link .. with href to some css>
<script.. with src to some script>

我可以期待css在加载和执行脚本之前会加载到页面中,还是可以加载并行?

can I expect that css will be loaded in page before script loaded and executed, or they can be loaded in parallel?

推荐答案


  1. CSS将开始加载和解析,
    脚本将开始加载和解析。
  2. 然后脚本将在加载/解析完成后执行。
  1. The CSS will start load and parse, The the script will start load and parse.
  2. Then the script will execute after the load/parse is complete.

这篇关于在页面中加载资产的顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆