Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async与defer有什么异同? #56

Open
zhuguly-zz opened this issue Jul 9, 2020 · 0 comments
Open

async与defer有什么异同? #56

zhuguly-zz opened this issue Jul 9, 2020 · 0 comments

Comments

@zhuguly-zz
Copy link
Owner

async和defer都是引入JS时进行异步加载的属性。
两者均不影响DOM解析和其他资源的加载,他们加载的过程都是和script.js并行异步加载,但是在渲染执行时,async仍然是与script.js并行的,而defer则等待所有元素解析完成之后才进行。
题目来自饥人谷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant