Ngoài những kỹ thuật cơ bản để wordpress (với woocommerce > 1000 sp) có thể load dưới 2s:

  • Sử dụng host chất lượng cao (server response < 1s – sử dụng google page insights để test)
  • Optimize images: tinypng hoặc plugin tương tự
  • sử dụng CDN

Bạn có thể sử dụng những kỹ thuật sau:

  1. Minify And Concatenate:

    Just like images, the number of files your site has to load will cause your site to slow down. WordPress, your theme, and all your plugins will be loading CSS and Javascript files, and those files can start adding up. So, we can combine them and then remove all unnecessary characters.

    Now, you will load one CSS file and one JavaScript file. Doing this can be quite difficult to handle. So you can use a plugin instead. Autoptimize will handle all the minification and concatenation for you.

    If something breaks, such as if a JavaScript file needs to be loaded before the Autoptimize files, you can set Autoptimize not to affect that file.

  2. Inline Above The Fold Content

When loading a website, content loads in a particular order, and this order isn’t always great. Sometimes content at the bottom of your screen will load before content at the top, which can delay content at the top of the screen. This is called Above the Fold since visitors can only see what’s at the top of the page.

So, you can start using this technique to have the content above the fold appear first, and Autoptimize will allow you to do this as well.

All you have to do is take your style.css, copy it, and paste it in this tool.

It will scan your page and let you know what to enter into Autoptimize’s setting for inlining CSS.

The only problem is that some pages may require different inlined CSS. I recommend testing it out and using the Critical Path CSS Generator tool from above to try on other pages.