Skip to content

179.async 属性诞生的初衷 #179

Open
@webVueBlog

Description

@webVueBlog

[js]

Activity

webVueBlog

webVueBlog commented on Apr 15, 2020

@webVueBlog
MemberAuthor

把脚本元素放在文档体的底端(/body> 标签之前,与之相邻),这样脚本就可以在 HTML 解析完毕后加载了。

只有在所有 HTML DOM 加载完成后才开始脚本的加载/解析过程。对于有大量 JavaScript 代码的大型网站,可能会带来显著的性能损耗。这也是 async 属性诞生的初衷。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @webVueBlog

        Issue actions

          179.async 属性诞生的初衷 · Issue #179 · weekCodeing/interview-answe