Skip to content

Instantly share code, notes, and snippets.

@tunght13488
Last active August 1, 2018 03:03
Show Gist options
  • Save tunght13488/67d0fb0ecdc976e83fb17acf5897e01b to your computer and use it in GitHub Desktop.
Save tunght13488/67d0fb0ecdc976e83fb17acf5897e01b to your computer and use it in GitHub Desktop.

PageSpeed

Serve resources from a consistent URL

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 67.3KiB. => same image should reuse instead of uploading with different name

Optimize images

Optimize the following images to reduce their size by 76.0KiB (5% reduction). => not worth it, saving just 76KB only. Anyway content team can use the report "optimized version" to upload again. E.g:

Original: https://www.courts.com.sg/media/gene-cms/1/8/18wk18-home-static-homeclub-mobile.jpg

Optimized: https://gtmetrix.com/reports/www.courts.com.sg/oveqJG5w/pagespeed/18wk18-home-static-homeclub-mobile_b44b1324fd9e1b0318d48b1d17c32c6c.jpg

Serve scaled images

The following images are resized in HTML or CSS. Serving scaled images could save 74.0KiB (95% reduction). => Resize the respective images and upload again

Leverage browser caching

Leverage browser caching for the following cacheable resources => There's nothing we can do about this as the assets used is external resources

YSlow

Add Expires headers

There are 14 static components without a far-future expiration date. => There's nothing we can do about this as the assets used is external resources

Make fewer HTTP requests

This page has 107 external Javascript scripts. Try combining them into one. This page has 9 external stylesheets. Try combining them into one. => Cannot. It's just how Magento 2 works.

Use a Content Delivery Network (CDN)

There are 9 static components that are not on CDN. => There's nothing we can do about this as the assets used is external resources

Minify JavaScript and CSS

There are 27 components that can be minified => They are inline script and we cannot minify them

Use cookie-free domains

There are 105 components that are not cookie-free => Some of them are external resources which we cannot control. For the website assets, what we need todo is buy a new domain (cannot use subdomain because the cookie is served across naked domain) and serve all assets from there

Reduce the number of DOM elements

There are 2812 DOM elements on the page => Cannot. It's just how Magento 2 works.

Reduce DNS lookups

The components are split over more than 4 domains => Cannot. External domain are used by integrations. Unless the business agree to remove BazaarVoice/Google/Facebook/Yahoo integrations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment