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

Improved site load time #64

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

HugoSave
Copy link
Contributor

@HugoSave HugoSave commented Jul 17, 2022

What?

  • Added the option to serve bootstrap css and bootstrap js using the standard CDN (defaults to not using CDN)
  • Changed so that the compressed bootstrap js is served instead of the uncompressed one.
  • Made the Alata font a "non critical" resouce by loading it async.

Why?

To fix performance issues as reported by PageSpeed when analysing the demo page. Hopefully fixes #63 or at least mitigates it.

  • The option to serve through CDN can help to download the bootstrap files faster, it did in my case at least and it does not hurt to have the option.
  • Saving bandwidth by serving minified js
  • Making it async improves the response time of the site. The downside is that the user might see the default font for a little while before the Alata font is loaded but PageSpeed reported that his font had quite large impact on the loading time so I thought it was worth the tradeof and this seems to be quite common practice. See image below for PageSpeed's loading time of this font.

image

Design notes

The font loading techniques was taken from css-tricks.

Testing

I saw 5-14 more performance score on PageSpeed score on my netlify build before and after these changes (when I used CDN to load bootstrap assets).

@HugoSave HugoSave changed the title Improved first content render time. Improved site load time Jul 17, 2022
@james-s-w-clark
Copy link

Nice!

@gurusabarish
Copy link
Owner

Hi @HugoSave , I will review this in weekend.

@gurusabarish
Copy link
Owner

Thanks @HugoSave

@gurusabarish gurusabarish merged commit a177362 into gurusabarish:master Jul 24, 2022
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.

Blogs - flickers when loading more
3 participants