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

chore: improve lighthouse score #1478

Merged
merged 6 commits into from
Jul 27, 2023
Merged

chore: improve lighthouse score #1478

merged 6 commits into from
Jul 27, 2023

Conversation

LBBO
Copy link
Contributor

@LBBO LBBO commented Jul 26, 2023

Improves the docs' lighthouse score through various measures.

Copy link
Member

@vinckr vinckr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I test if this improves lighthouse score?

This PR Lighthouse score:
Screenshot 2023-07-26 at 18 09 54

Current deploy score:
Screenshot 2023-07-26 at 18 11 20

In my test the deploy from this PR was worse than the current one, so I am not sure if I did something wrong in the test or if there is another issue. I ran the lighthouse tests from an incognito tab.

src/static/img/logos/HOW-TO-UPDATE.md Show resolved Hide resolved
@LBBO
Copy link
Contributor Author

LBBO commented Jul 26, 2023

That's actually a good point. It's kind of hard to get a deterministic result there and there might well be some unintended issues. But what you should™️ be able to tell deterministically, is that two issues used to be there that are now gone (image height & width and caching policy, IIRC). You can also make things more uniform by testing against two preview builds (just use another branch's preview), as Vercel may be applying certain optimisations to prod that it doesn't apply to previews. I definitely didn't see such a drastic difference in my tests, but it's totally possible that I did something wrong as well.

@vinckr
Copy link
Member

vinckr commented Jul 26, 2023

Screenshot 2023-07-26 at 18 22 02

This was on another preview (https://docs-fzoojem2y-ory.vercel.app/docs/welcome), no idea why it is higher now 😅

Have to take a more detailed look tomorrow.

@aeneasr
Copy link
Member

aeneasr commented Jul 26, 2023

The previews are typically a bit worse than the live site due to cloudflare optimizations. But if they're worse than other previews then we need to check

@aeneasr aeneasr merged commit 052656f into master Jul 27, 2023
10 checks passed
@aeneasr aeneasr deleted the improve-lighthouse-score branch July 27, 2023 14:33
@mszekiel
Copy link
Collaborator

@vinckr please remember to test with https://pagespeed.web.dev/ for consistent results

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

Successfully merging this pull request may close these issues.

4 participants