How we increase pagespeed for Google / Gtmetrix

Hi Friends,

I need help for increase page speed. I have used below points.

  1. Removed unnecessary code
  2. Code Splitting
  3. Also i have used plugin ( Lazy Load - Optimize Images) for lazy loading.

Still speed is not increased. Any other way missing for this?

Thank you.

What is the domain you are checking?

Because Pagespeed will explain what is wrong and how to solve certain issues, although does require some knowledge on what they mean exactly.

Also keep in mind that WP performance plugins usually don’t help in Frontity, unless it also affects the REST API (which is very rare).

1 Like

Hi @Johan

Thanks For reply me.

I am checking in this site : http://13.233.85.111:3000/

Also i have used AWS server.

If you check PageSpeed Insights the first thing that you’ll notice is that it takes a very long time before the server is even returning something (in my case 6.7 seconds, which should be under 600ms). So make sure your server is able to handle it.

Second, there is no caching for static files (img, js, css), meaning the visitor needs to retrieve those files at every request.

I also recommend taking a look at this section of the docs:

Deploy your site on vercel, or a VPS with cloudflare set to cache everything and you will see the difference.

Also your host API where you are serving the data, do you use any sort of caching for requests?

Also from the looks of it, you have not actually “built” the frontity server, you just ran frontity dev correct? Because there is no way your js payload is 21MB if you ran npx frontity build

I had that issue as well on build (ran into a 50MB JS file), because I loaded all CSS, fonts and SVG images into JS :man_facepalming:
Until I found out about loadable and moving all assets out of JS (even though it’s somewhat recommended).

So it is possible, but also easy to fix. Although it might take a bit of tweaking on your server (apache/nginx configs).

1 Like

If the speed’s still not up to par even after removing code and Lazy Loading images, you can try:

  1. Browser Caching: Let your website elements chill out on users’ devices, so they load faster on return visits.
  2. Minify CSS and JavaScript: Squish 'em down for quicker loading.
  3. CDN Magic: Go global with a CDN like RabbitLoader. It’ll speed things up by serving content from closer servers.
  4. Check Server Response: If your server’s being sluggish, consider an upgrade.
  5. Font Fun: Stick to fewer fonts and use speedy formats.
  6. Cut the Requests: Keep those HTTP requests in check, fewer is better.
  7. Mobile Matters: Make sure your mobile version is fast too.

Regularly test your speed using Google PageSpeed Insights or GTmetrix.

did you fixed. my files is 24mb payload i checked by hiding all pages and just show one compoenent it still shows 12 mb how can i reduce