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

prefetch和preload #19

Open
dongtianqi opened this issue Mar 20, 2019 · 0 comments
Open

prefetch和preload #19

dongtianqi opened this issue Mar 20, 2019 · 0 comments

Comments

@dongtianqi
Copy link
Owner

dongtianqi commented Mar 20, 2019

  1. preload的script代码会被优先加载,并且会占用http并发数
  2. prefetch的script被安排正常js的后面加载,这样才达到了优化效果
    (webpack的懒加载其实就是把组件js变成一个prefetch的js)

image

image
image

webpack 懒加载:
这里的repaymentlist是懒加载的,其他是正常引入的
image

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