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

Further speed up load time and don't slow down because of security #14

Open
hpvd opened this issue Aug 8, 2022 · 2 comments
Open

Further speed up load time and don't slow down because of security #14

hpvd opened this issue Aug 8, 2022 · 2 comments

Comments

@hpvd
Copy link

hpvd commented Aug 8, 2022

With http/2 and http/3 server push of resources to load them earlier, one could do 2 things

Sadly, server push is dead since chrome removes support because only to few websites makes use of it...
https://groups.google.com/a/chromium.org/g/blink-dev/c/K3rYLvmQUBY/m/vOWBKZGoAQAJ?pli=1

But there is another alternative:
giving a preload hint for needed resources
https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types/preload

browser coverage is 94.75% for Resource Hints: preload
https://caniuse.com/?search=preload

@hpvd
Copy link
Author

hpvd commented Aug 8, 2022

as first, pretty easy step:
would be interesting to see if there is a difference noticeable if one give a preload hint to the main script:
https://liveviews.cc/js/bundle.min.js

e.g. current status of https://liveviews.cc/editor
2022-08-08_14h40_09

@beenotung
Copy link
Owner

In the current version, the bundle script is placed before the main content, and given a "defer" attribute. This setup should allow the browser to fetch the script early without blocking the DOM parsing.

So using preload link should be making no difference?

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

2 participants