stacksorted
stacksorted copied to clipboard
Optimize performance and SEO
This PR is a bit larger but I tried to split it into multiple simpler commits.
Old lighthouse score: New score:
The old site transferred 908kB on load, the new one just 259kB.
Quick rundown of the changes:
- Added a simple description for search engines
- Marked links as User Generated Content (this site's reputation will not be influenced by the reputation of linked sites)
- Added robots.txt
- Changed the names from h3 to h2
- Added aria labels for accessibility
- Made images lazy load (only loads when the user scrolls near them)
- Made the browser preconnect to save time
- Added compression middleware
The only change needed to reach 100% on performance is to use webp instead of png/gif. Don't forget to add your site in Google's Search Console so it's visible.