CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.4k stars 106 forks source link

Enhancing Website Performance with Critical Asset Preloading and Loading Attribute Optimization 📜 #403

Closed sanjaiyan-dev closed 1 year ago

sanjaiyan-dev commented 1 year ago

Minor optimizations for the website include:

  1. Adding the preload attribute for critical scripts. For more information, refer to: https://web.dev/preload-critical-assets.

  2. Moving the <script defer> tag to the top of the <head> section to improve fetching speed while maintaining execution order.

  3. Adding the loading="async" attribute for images to enable faster content presentation. You can find more details here: https://css-tricks.com/newsletter/249-decoding-async-tree-rings-and-flexbox-gap/.

  4. Implementing the loading="lazy" attribute for <iframe> elements to enhance initial load speed. For additional information, visit: https://web.dev/iframe-lazy-loading/.

These optimizations will help improve the performance and user experience of your website.

bglw commented 1 year ago

Hi @sanjaiyan-dev 👋

Thanks for taking the effort to look at the website — I'm sorry to do this but unfortunately I have just transitioned the website to using CloudCannon's new Alto template as a direct dependency — so the files modified in this pull request no longer exist in this repository.

If you have a look at the Alto template and have any changes you think are relevant, I would be more than happy to review a Pull Request there with any optimizations.

Thanks again!

sanjaiyan-dev commented 1 year ago

Hi @sanjaiyan-dev 👋

Thanks for taking the effort to look at the website — I'm sorry to do this but unfortunately I have just transitioned the website to using CloudCannon's new Alto template as a direct dependency — so the files modified in this pull request no longer exist in this repository.

If you have a look at the Alto template and have any changes you think are relevant, I would be more than happy to review a Pull Request there with any optimizations.

Thanks again!

Ok 🤝

sanjaiyan-dev commented 12 months ago

Hi @sanjaiyan-dev 👋

Thanks for taking the effort to look at the website — I'm sorry to do this but unfortunately I have just transitioned the website to using CloudCannon's new Alto template as a direct dependency — so the files modified in this pull request no longer exist in this repository.

If you have a look at the Alto template and have any changes you think are relevant, I would be more than happy to review a Pull Request there with any optimizations.

Thanks again!

@bglw https://github.com/CloudCannon/alto-hugo-template/pull/1