Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/thedaviddias/Front-End-Performance-Checklist

๐ŸŽฎ The only Front-End Performance Checklist that runs faster than the others
https://github.com/thedaviddias/Front-End-Performance-Checklist

List: Front-End-Performance-Checklist

checklist css front-end-developer-tool front-end-development frontend guidelines html javascript lists performance performance-metrics reference resources web-development

Last synced: about 1 month ago
JSON representation

๐ŸŽฎ The only Front-End Performance Checklist that runs faster than the others

Lists

README

        




Front-End Performance Checklist




ย  Front-End Performance Checklist
ย 

---

๐Ÿšจ Currently working on new version of frontendchecklist.io
(that will include the current performance).
Feel free to discuss any feature you would like to see. Thanks for your support!

---

๐ŸŽฎ The only Front-End Performance Checklist that runs faster than the others.


One simple rule: "Design and code with performance in mind"


ย 
ย ย ย  PRs Welcome
ย 

ย 
ย ย ย  Discord
ย 

ย  ย 
ย ย ย  Licence MIT
ย 


ย  How To Use โ€ข Contributing โ€ข Product Hunt


๐Ÿ‡จ๐Ÿ‡ณ
๐Ÿ‡ซ๐Ÿ‡ท
๐Ÿ‡ฐ๐Ÿ‡ท
๐Ÿ‡ต๐Ÿ‡น
๐Ÿ‡ท๐Ÿ‡บ
๐Ÿ‡ฏ๐Ÿ‡ต
๐Ÿ‡ฎ๐Ÿ‡ท


Other Checklists:


๐Ÿ—‚ Front-End Checklist โ€ข ๐Ÿ’Ž Front-End Design Checklist

## Introduction

Performance is a huge subject, but it's not always a "back-end" or an "admin" subject: it's a Front-End responsibility too. The Front-End Performance Checklist is an exhaustive list of elements you should check or at least be aware of, as a Front-End developer and apply to your project (personal and professional).

### How to use?

For each rule, you will have a paragraph explaining *why* this rule is important and *how* you can fix it. For more deep information, you should find links that will point to ๐Ÿ›  tools, ๐Ÿ“– articles or ๐Ÿ“น medias that can complete the checklist.

All items in the **Front-End Performance Checklist** are essentials to achieve the highest performance score but you would find an indicator to help you to eventually prioritised some rules amount others. There are 3 levels of priority:

* ![Low][low] means that the item has a **low** priority.
* ![Medium][medium] means that the item has a **medium** priority. You shouldn't avoid tackling that item.
* ![High][high] means that the item has a **high** priority. You can't avoid following that rule and implement the corrections recommended.

### Performance tools

List of the tools you can use to test or monitor your website or application:

* ๐Ÿ›  [WebPagetest - Website Performance and Optimization Test](https://www.webpagetest.org/)
* ๐Ÿ›  โ˜† [Dareboost: Website Speed Test and Website Analysis](https://www.dareboost.com/) (use the coupon WPCDD20 for -20%)
* ๐Ÿ›  [Treo: Page Speed Monitoring](https://treo.sh/?ref=perfchecklist)
* ๐Ÿ›  [GTmetrix | Website Speed and Performance Optimization](https://gtmetrix.com/)
* ๐Ÿ›  [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/)
* ๐Ÿ›  [Web.dev](https://web.dev/measure)
* ๐Ÿ›  [Pingdom Website Speed Test](https://tools.pingdom.com)
* ๐Ÿ“– [Make the Web Fasterย | Google Developers](https://developers.google.com/speed/)
* ๐Ÿ›  [Sitespeed.io - Welcome to the wonderful world of Web Performance](https://www.sitespeed.io/)
* ๐Ÿ›  [Calibre](https://calibreapp.com/)
* ๐Ÿ›  [Website Speed Test | Check Web Performance ยป Dotcom-Tools](https://www.dotcom-tools.com/website-speed-test.aspx)
* ๐Ÿ›  [Website and Server Uptime Monitoring - Pingdom](https://www.pingdom.com/product/uptime-monitoring/) ([Free Signup Link](https://www.pingdom.com/free))
* ๐Ÿ›  [Uptime Robot](https://uptimerobot.com)
* ๐Ÿ›  [SpeedCurve: Monitor front-end performance](https://speedcurve.com)
* ๐Ÿ›  [PWMetrics - CLI tool and lib to gather performance metrics](https://github.com/paulirish/pwmetrics)
* ๐Ÿ›  [Varvy - Page speed optimization]( https://varvy.com/pagespeed/)
* ๐Ÿ›  [Lighthouse - Google]( https://developers.google.com/web/tools/lighthouse/#devtools)
* ๐Ÿ›  [Checkbot browser extension - Checks for web performance best practices](https://www.checkbot.io/)
* ๐Ÿ›  [Yellow Lab Tools | Online test to help speeding up heavy web pages](https://yellowlab.tools/)
* ๐Ÿ›  [Speedrank - Web Performance Monitoring](https://speedrank.app/)
* ๐Ÿ›  [DebugBear - Monitor website performance and Lighthouse scores](https://www.debugbear.com/)
* ๐Ÿ›  [packtracker.io - Check your webpack bundle size on every pull request.](https://packtracker.io/)
* ๐Ÿ›  [Exthouse - Analyze the impact of a browser extension on web performance](https://github.com/treosh/exthouse)
* ๐Ÿ›  [LogRocket - Measure front-end performance in production apps](https://logrocket.com)

### References

* ๐Ÿ“น [The Cost Of JavaScript - YouTube](https://www.youtube.com/watch?v=_bzqF05xsC4) ([text version](https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4))
* [AddyOsmani.com - Start Performance Budgeting](https://addyosmani.com/blog/performance-budgets/)
* ๐Ÿ“– [Get Started With Analyzing Runtime Performance ย |ย  Google Developers](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/)
* ๐Ÿ“– [State of the Web | 2018_01_01](https://httparchive.org/reports/state-of-the-web?start=2018_01_01)
* ๐Ÿ“– [Page Weight Doesn't Matter](https://www.speedshop.co/2015/11/05/page-weight-doesnt-matter.html)
* ๐Ÿ“– [Front-End Performance Checklist 2021 [PDF, Apple Pages, MS Word]](https://www.smashingmagazine.com/2021/01/front-end-performance-2021-free-pdf-checklist/)
* ๐Ÿ“– [Designing for Performance Weighing Aesthetics and Speed - By Lara Callender Hogan [eBook, Print]](http://designingforperformance.com/index.html)
* ๐Ÿ“– [Varvy - Web performance glossary](https://varvy.com/performance/)
* ๐Ÿ“– [fabkrum/web-performance-resources: Up to date collection of valuable web performance resources](https://github.com/fabkrum/web-performance-resources)
* ๐Ÿ“– [Checkbot - Web Speed Best Practices](https://www.checkbot.io/guide/speed/)
* ๐Ÿ›  [Progressive Tooling - A list of community-built, third-party tools that can be used to improve page performance](https://progressivetooling.com/)

---

## HTML

![html]

- [ ] **Minified HTML:** ![medium] The HTML code is minified, comments, white spaces and new lines are removed from production files.

*Why:*
> Removing all unnecessary spaces, comments and attributes will reduce the size of your HTML and speed up your site's page load times and obviously lighten the download for your user.

*How:*
> Most of the frameworks have plugins to facilitate the minification of the webpages. You can use a bunch of NPM modules that can do the job for you automatically.

* ๐Ÿ›  [HTML minifier | Minify Code](http://minifycode.com/html-minifier/)
* ๐Ÿ›  [Online HTML Compressor](http://refresh-sf.com)
* ๐Ÿ“– [Experimenting with HTML minifier โ€” Perfection Kills](http://perfectionkills.com/experimenting-with-html-minifier/#use_short_doctype)
ย ย ย 
- [ ] **Place CSS tags always before JavaScript tags:** ![high] Ensure that your CSS is always loaded before having JavaScript code.

```html







```

*Why:*
> Having your CSS tags before any JavaScript enables better, parallel download which speed up browser rendering time.

*How:*
> โƒ Ensure that `` and `` in your `<head>` are always before your `<script>`.

* ๐Ÿ“– [Ordering your styles and scripts for pagespeed](https://varvy.com/pagespeed/style-script-order.html)

- [ ] **Minimize the number of iframes:** ![high] Use iframes only if you don't have any other technical possibility. Try to avoid iframes as much as you can.

- [ ] **Pre-load optimization with prefetch, dns-prefetch and prerender:** ![low] Popular browsers can use directive on `<link>` tag and "rel" attribute with certain keywords to pre-load specific URLs.

*Why:*
> Prefetching allows a browser to silently fetch the necessary resources needed to display content that a user might access in the near future. The browser is able to store these resources in its cache and speed up the way web pages load when they are using different domains for page resources. When a web page has finished loading and the idle time has passed, the browser begins downloading other resources. When a user go in a particular link (already prefetched), the content will be instantly served.

*How:*
> โƒ Ensure that `<link>` is in your `<head>` section.

* ๐Ÿ“– [What Is Prefetching and Why Use It](https://www.keycdn.com/support/prefetching)
* ๐Ÿ“– [Prefetching, preloading, prebrowsing](https://css-tricks.com/prefetching-preloading-prebrowsing/)
* ๐Ÿ“– [What is Preload, Prefetch, and Preconnect](https://www.keycdn.com/blog/resource-hints)

**[โฌ† back to top](#table-of-contents)**

## CSS

![css]

- [ ] **Minification:** ![high] All CSS files are minified, comments, white spaces and new lines are removed from production files.

*Why:*
> When CSS files are minified, the content is loaded faster and less data is sent to the client. It's important to always minify CSS files in production. It is beneficial for the user as it is for any business who wants to lower bandwidth costs and lower resource usage.

*How:*
> โƒ Use tools to minify your files automatically before or during your build or your deployment.

* ๐Ÿ›  [cssnano: A modular minifier based on the PostCSS ecosystem. - cssnano](https://cssnano.co/)
* ๐Ÿ›  [CSS Minfier](https://goonlinetools.com/css-minifier/)
* ๐Ÿ›  [@neutrinojs/style-minify - npm](https://www.npmjs.com/package/@neutrinojs/style-minify)
* ๐Ÿ›  [Online CSS Compressor](http://refresh-sf.com)

- [ ] **Concatenation:** ![medium] CSS files are concatenated in a single file *(Not always valid for HTTP/2)*.

```html

<!-- Not recommended -->
<link rel="stylesheet" href="foo.css"/>
<link rel="stylesheet" href="bar.css"/>

<!-- Recommended -->
<link rel="stylesheet" href="foobar.css"/>
```

*Why:*
> If you are still using HTTP/1, you may need to still concatenate your files, it's less true if your server use HTTP/2 (tests should be made).

*How:*
> โƒ Use online tool or any plugin before or during your build or your deployment to concatenate your files. <br>
โƒ Ensure, of course, that concatenation does not break your project.

* ๐Ÿ“– [HTTP: Optimizing Application Delivery - High Performance Browser Networking (O'Reilly)](https://hpbn.co/optimizing-application-delivery/#optimizing-for-http2)
* ๐Ÿ“– [Performance Best Practices in the HTTP/2 Era](https://deliciousbrains.com/performance-best-practices-http2/)

- [ ] **Non-blocking:** ![high] CSS files need to be non-blocking to prevent the DOM from taking time to load.

```html
<link rel="preload" href="global.min.css" as="style" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="global.min.css"></noscript>
```

*Why:*
> CSS files can block the page load and delay the rendering of your page. Using `preload` can actually load the CSS files before the browser starts showing the content of the page.

*How:*
> โƒ You need to add the `rel` attribute with the `preload` value and add `as="style"` on the `<link>` element.

* ๐Ÿ›  [loadCSS by filament group](https://github.com/filamentgroup/loadCSS)
* ๐Ÿ“– [Example of preload CSS using loadCSS](https://gist.github.com/thedaviddias/c24763b82b9991e53928e66a0bafc9bf)
* ๐Ÿ“– [Preloading content with rel="preload"](https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content)
* ๐Ÿ“– [Preload: What Is It Good For? โ€” Smashing Magazine](https://www.smashingmagazine.com/2016/02/preload-what-is-it-good-for/)

- [ ] **Unused CSS:** ![medium] Remove unused CSS selectors.

*Why:*
> Removing unused CSS selectors can reduce the size of your files and then speed up the load of your assets.

*How:*
> โƒ โš ๏ธ Always check if the framework CSS you want to use don't already has a reset / normalize code included. Sometimes you may not need everything that is inside your reset / normalize file.

* ๐Ÿ›  [UnCSS Online](https://uncss-online.com/)
* ๐Ÿ›  [PurifyCSS](https://github.com/purifycss/purifycss)
* ๐Ÿ›  [PurgeCSS](https://github.com/FullHuman/purgecss)
* ๐Ÿ›  [Chrome DevTools Coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage)

* [ ] **CSS Critical:** ![high] The CSS critical (or "above the fold") collects all the CSS used to render the visible portion of the page. It is embedded before your principal CSS call and between `<style>` in a single line (minified if possible).

*Why:*
> Inlining critical CSS help to speed up the rendering of the web pages reducing the number of requests to the server.

*How:*
> Generate the CSS critical with online tools or using a plugin like the one that Addy Osmani developed.

* ๐Ÿ“– [Understanding Critical CSS](https://www.smashingmagazine.com/2015/08/understanding-critical-css/)
* ๐Ÿ›  [Critical by Addy Osmani on GitHub](https://github.com/addyosmani/critical) automates this.
* ๐Ÿ“– [Inlining critical CSS for better web performance | Go Make Things](https://gomakethings.com/inlining-critical-css-for-better-web-performance/)
* ๐Ÿ›  [Critical Path CSS Generator - Prioritize above the fold content :: SiteLocity](https://www.sitelocity.com/critical-path-css-generator)
* ๐Ÿ“– [Reduce the size of the above-the-fold content
](https://developers.google.com/speed/docs/insights/PrioritizeVisibleContent)

- [ ] **Embedded or inline CSS:** ![high] Avoid using embed or inline CSS inside your `` *(Not valid for HTTP/2)*

*Why:*
> One of the first reason it's because it's a good practice to **separate content from design**. It also helps you have a more maintainable code and keep your site accessible. But regarding performance, it's simply because it decreases the file-size of your HTML pages and the load time.

*How:*
> Always use external stylesheets or embed CSS in your `` (and follow the others CSS performance rules)

* ๐Ÿ“– [Observe CSS Best Practices: Avoid CSS Inline Styles](https://www.lifewire.com/avoid-inline-styles-for-css-3466846)

- [ ] **Analyse stylesheets complexity:** ![high] Analyzing your stylesheets can help you to flag issues, redundancies and duplicate CSS selectors.

*Why:*
> Sometimes you may have redundancies or validation errors in your CSS, analysing your CSS files and removed these complexities can help you to speed up your CSS files (because your browser will read them faster)

*How:*
> Your CSS should be organized, using a CSS preprocessor can help you with that. Some online tools listed below can also help you analysing and correct your code.

* ๐Ÿ›  [TestMyCSS | Optimize and Check CSS Performance](http://www.testmycss.com/)
* ๐Ÿ›  [CSS Stats](https://cssstats.com/)
* ๐Ÿ›  [macbre/analyze-css: CSS selectors complexity and performance analyzer](https://github.com/macbre/analyze-css)
* ๐Ÿ›  [Project Wallace](https://www.projectwallace.com/) is like CSS Stats but stores stats over time so you can track your changes

**[โฌ† back to top](#table-of-contents)**

## Fonts

![fonts]

* ๐Ÿ“– [A Book Apart, Webfont Handbook](https://abookapart.com/products/webfont-handbook)

- [ ] **Webfont formats:** ![medium] You are using WOFF2 on your web project or application.

*Why:*
> According to Google, the WOFF 2.0 Web Font compression format offers 30% average gain over WOFF 1.0. It's then good to use WOFF 2.0, WOFF 1.0 as a fallback and TTF.

*How:*
> Check before buying your new font that the provider gives you the WOFF2 format. If you are using a free font, you can always use Font Squirrel to generate all the formats you need.

* ๐Ÿ“– [WOFF 2.0 โ€“ Learn more about the next generation Web Font Format and convert TTF to WOFF2](https://gist.github.com/sergejmueller/cf6b4f2133bcb3e2f64a)
* ๐Ÿ›  [Create Your Own @font-face Kits ยป Font Squirrel](https://www.fontsquirrel.com/tools/webfont-generator)
* ๐Ÿ›  [IcoMoon App - Icon Font, SVG, PDF & PNG Generator](https://icomoon.io/app/)
* ๐Ÿ“– [Using @font-face | CSS-Tricks](https://css-tricks.com/snippets/css/using-font-face/?ref=frontendchecklist)
* ๐Ÿ“– [Can I use... WOFF2](https://caniuse.com/#feat=woff2)

- [ ] **Use `preconnect` to load your fonts faster:** ![medium]

```html

```

*Why:*
> When you arrived on a website, your device needs to find out where your site lives and which server it needs to connect with. Your browser had to contact a DNS server and wait for the lookup complete before fetching the resource (fonts, CSS files...). Prefetches and preconnects allow the browser to lookup the DNS information and start establishing a TCP connection to the server hosting the font file. This provides a performance boost because by the time the browser gets around to parsing the css file with the font information and discovering it needs to request a font file from the server, it will already have pre-resolved the DNS information and have an open connection to the server ready in its connection pool.

*How:*
> โƒ Before prefetching your webfonts, use webpagetest to evaluate your website

โƒ Look for teal colored DNS lookups and note the host that are being requested

โƒ Prefetch your webfonts in your `` and add eventually these hostnames that you should prefetch too

* ๐Ÿ“– [Faster Google Fonts with Preconnect - CDN Planet](https://www.cdnplanet.com/blog/faster-google-webfonts-preconnect/)
* ๐Ÿ“– [Make Your Site Faster with Preconnect Hints | Viget](https://www.viget.com/articles/make-your-site-faster-with-preconnect-hints/)
* ๐Ÿ“– [Ultimate Guide to Browser Hints: Preload, Prefetch, and Preconnect - MachMetrics Speed Blog](https://www.machmetrics.com/speed-blog/guide-to-browser-hints-preload-preconnect-prefetch/)
* ๐Ÿ“– [A Comprehensive Guide to Font Loading Strategiesโ€”zachleat.com](https://www.zachleat.com/web/comprehensive-webfonts/#font-face)
* ๐Ÿ›  [typekit/webfontloader: Web Font Loader gives you added control when using linked fonts via @font-face.](https://github.com/typekit/webfontloader)

- [ ] **Webfont size:** ![medium] Webfont sizes don't exceed 300kb (all variants included)

* ๐Ÿ“– [Font Bytes - Page Weight](https://httparchive.org/reports/page-weight#bytesFont)

- [ ] **Prevent Flash or Invisible Text:** ![medium] Avoid transparent text until the Webfont is loaded

* ๐Ÿ“– [`font-display` for the Masses](https://css-tricks.com/font-display-masses/)
* ๐Ÿ“– [CSS font-display: The Future of Font Rendering on the Web](https://www.sitepoint.com/css-font-display-future-font-rendering-web/)

**[โฌ† back to top](#table-of-contents)**

## Images

![images]

* ๐Ÿ“– [Image Bytes in 2018](https://httparchive.org/reports/page-weight#bytesImg)

* [ ] **Images optimization:** ![high] Your images are optimized, compressed without direct impact to the end user.

*Why:*
> Optimized images load faster in your browser and consume less data.

*How:*
> โƒ Try using CSS3 effects when it's possible (instead of a small image)

โƒ When it's possible, use fonts instead of text encoded in your images

โƒ Use SVG

โƒ Use a tool and specify a level compression under 85.

* ๐Ÿ“– [Image Optimization | Web Fundamentals | Google Developers](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/image-optimization)
* ๐Ÿ“– [Essential Image Optimization - An eBook by Addy Osmani](https://images.guide/)
* ๐Ÿ›  [TinyJPG โ€“ Compress JPEG images intelligently](https://tinyjpg.com/)
* ๐Ÿ›  [Kraken.io - Online Image Optimizer](https://kraken.io/web-interface)
* ๐Ÿ›  [Compressor.io - optimize and compress JPEG photos and PNG images](https://compressor.io/compress)
* ๐Ÿ›  [Cloudinary - Image Analysis Tool](https://webspeedtest.cloudinary.com)
* ๐Ÿ›  [ImageEngine - Image Webpage Loading Test](https://demo.imgeng.in)
* ๐Ÿ›  [SVGOMG - Optimize SVG vector graphics files](https://jakearchibald.github.io/svgomg/)

* [ ] **Images format:** ![high] Choose your image format appropriately.

*Why:*
> To ensure that your images don't slow your website, choose the format that will correspond to your image. If it's a photo, JPEG is most of the time more appropriate than PNG or GIF. But don't forget to look a the nex-gen formats which can reduce the size of your files. Each image format has pros and cons, it's important to know these to make the best choice possible.

*How:*
> โƒ Use [Lighthouse](https://developers.google.com/web/tools/lighthouse/) to identify which images can eventually use **next-gen formats** (like JPEG 2000m JPEG XR or WebP)

โƒ Compare different formats, sometimes using PNG8 is better than PNG16, sometimes it's not.

* ๐Ÿ“– [Serve Images in Next-Gen Formats ย |ย  Tools for Web Developers ย |ย  Google Developers](https://developers.google.com/web/tools/lighthouse/audits/webp)
* ๐Ÿ“– [What Is the Right Image Format for Your Website? โ€” SitePoint](https://www.sitepoint.com/what-is-the-right-image-format-for-your-website/)
* ๐Ÿ“– [PNG8 - The Clear Winner โ€” SitePoint](https://www.sitepoint.com/png8-the-clear-winner/)
* ๐Ÿ“– [8-bit vs 16-bit - What Color Depth You Should Use And Why It Matters - DIY Photography](https://www.diyphotography.net/8-bit-vs-16-bit-color-depth-use-matters/)

- [ ] **Use vector image vs raster/bitmap:** ![medium] Prefer using vector image rather than bitmap images (when possible).

*Why:*
> Vector images (SVG) tend to be smaller than images and SVG's are responsive and scale perfectly. These images can be animated and modified by CSS.

* [ ] **Images dimensions:** ![medium] Set `width` and `height` attributes on `` if the final rendered image size is known.

*Why:*
> If height and width are set, the space required for the image is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the image, and cannot reserve the appropriate space to it. The effect will be that the page layout will change during loading (while the images load).

* [ ] **Avoid using Base64 images:** ![medium] You could eventually convert tiny images to base64 but it's actually not the best practice.

* ๐Ÿ“– [Base64 Encoding & Performance, Part 1 and 2 by Harry Roberts](https://csswizardry.com/2017/02/base64-encoding-and-performance/)
* ๐Ÿ“– [A closer look at Base64 image performance โ€“ The Page Not Found Blog](http://www.andygup.net/a-closer-look-at-base64-image-performance/)
* ๐Ÿ“– [When to base64 encode images (and when not to) | David Calhoun](https://www.davidbcalhoun.com/2011/when-to-base64-encode-images-and-when-not-to/)
* ๐Ÿ“– [Base64 encoding images for faster pages | Performance and seo factors](https://varvy.com/pagespeed/base64-images.html)

* [ ] **Lazy loading:** ![medium] Offscreen images are loaded lazily (A noscript fallback is always provided).

*Why:*
> It will improve the response time of the current page and then avoid loading unnecessary images that the user may not need.

*How:*
> โƒ Use [Lighthouse](https://developers.google.com/web/tools/lighthouse/) to identify how many **images are offscreen**.

โƒ Use a JavaScript plugin like the following to lazyload your images. Make sure you target offscreen images only.

โƒ Also make sure to lazyload alternative images shown at mouseover or upon other user actions.

* ๐Ÿ›  [verlok/lazyload: GitHub](https://github.com/verlok/lazyload)
* ๐Ÿ›  [aFarkas/lazysizes: GitHub](https://github.com/aFarkas/lazysizes/)
* ๐Ÿ›  [mfranzke/loading-attribute-polyfill: GitHub](https://github.com/mfranzke/loading-attribute-polyfill/)
* ๐Ÿ“– [Lazy Loading Images and Video ย |ย  Web Fundamentals ย |ย  Google Developers](https://developers.google.com/web/fundamentals/performance/lazy-loading-guidance/images-and-video/)
* ๐Ÿ“– [5 Brilliant Ways to Lazy Load Images For Faster Page Loads - Dynamic Drive Blog](http://blog.dynamicdrive.com/5-brilliant-ways-to-lazy-load-images-for-faster-page-loads/)

* [ ] **Responsive images:** ![medium] Ensure to serve images that are close to your display size.

*Why:*
> Small devices don't need images bigger than their viewport. It's recommended to have multiple versions of one image on different sizes.

*How:*
> โƒ Create different image sizes for the devices you want to target.

โƒ Use `srcset` and `picture` to deliver multiple variants of each image.

* ๐Ÿ“– [Responsive images - Learn web development | MDN](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images)

**[โฌ† back to top](#table-of-contents)**

## JavaScript

![javascript]

- [ ] **JS Minification:** ![high] All JavaScript files are minified, comments, white spaces and new lines are removed from production files *(still valid if using HTTP/2)*.

*Why:*
> Removing all unnecessary spaces, comments and break will reduce the size of your JavaScript files and speed up your site's page load times and obviously lighten the download for your user.

*How:*
> โƒ Use the tools suggested below to minify your files automatically before or during your build or your deployment.

* ๐Ÿ›  [uglify-js - npm](https://www.npmjs.com/package/uglify-js)
* ๐Ÿ›  [Online JavaScript Compressor](http://refresh-sf.com)
* ๐Ÿ“– [Short read: How is HTTP/2 different? Should we still minify and concatenate?](https://scaleyourcode.com/blog/article/28)

* [ ] **No JavaScript inside:** ![medium] *(Only valid for website)* Avoid having multiple JavaScript codes embedded in the middle of your body. Regroup your JavaScript code inside external files or eventually in the `` or at the end of your page (before ``).

*Why:*
> Placing JavaScript embedded code directly in your `` can slow down your page because it loads while the DOM is being built. The best option is to use external files with `async` or `defer` to avoid blocking the DOM. Another option is to place some scripts inside your ``. Most of the time analytics code or small script that need to load before the DOM gets to main processing.

*How:*
> Ensure that all your files are loaded using `async` or `defer` and decide wisely the code that you will need to inject in your ``.

* ๐Ÿ“– [11 Tips to Optimize JavaScript and Improve Website Loading Speeds](https://www.upwork.com/hiring/development/11-tips-to-optimize-javascript-and-improve-website-loading-speeds/)

* [ ] **Non-blocking JavaScript:** ![high] JavaScript files are loaded asynchronously using `async` or deferred using `defer` attribute.

```html



```

*Why:*
> JavaScript blocks the normal parsing of the HTML document, so when the parser reaches a `` tag (particularly is inside the `<head>`), it stops to fetch and run it. Adding `async` or `defer` are highly recommended if your scripts are placed in the top of your page but less valuable if just before your `</body>` tag. But it's a good practice to always use these attributes to avoid any performance issue.

*How:*
> โƒ Add `async` (if the script don't rely on other scripts) or `defer` (if the script relies upon or relied upon by an async script) as an attribute to your script tag. <br>
โƒ If you have small scripts, maybe use inline script place above async scripts.

* ๐Ÿ“– [Remove Render-Blocking JavaScript](https://developers.google.com/speed/docs/insights/BlockingJS)
* ๐Ÿ“– [Defer loading JavaScript](https://varvy.com/pagespeed/defer-loading-javascript.html)

* [ ] **Optimized and updated JS libraries:** ![medium] All JavaScript libraries used in your project are necessary (prefer Vanilla JavaScript for simple functionalities), updated to their latest version and don't overwhelm your JavaScript with unnecessary methods.

*Why:*
> Most of the time, new versions come with optimization and security fix. You should use the most optimized code to speed up your project and ensure that you'll not slow down your website or app without outdated plugin.

*How:*
> If your project use NPM packages, [npm-check](https://www.npmjs.com/package/npm-check) is a pretty interesting library to upgrade / update your libraries.
> [Greenkeeper](https://greenkeeper.io/) can automatically look for your dependencies and suggest an update every time a new version is out.

* ๐Ÿ“– [You may not need jQuery](http://youmightnotneedjquery.com/)
* ๐Ÿ“– [Vanilla JavaScript for building powerful web applications](https://plainjs.com/)

- [ ] **Check dependencies size limit:** ![low] Ensure to use wisely external libraries, most of the time, you can use a lighter library for a same functionality.

*Why:*
> You may be tempted to use one of the 745 000 packages you can find on [npm](https://www.npmjs.com/), but you need to choose the best package for your needs. For example, MomentJS is an awesome library but with a lot of methods you may never use, that's why Day.js was created. It's just 2kB vs 16.4kB gz for Moment.

*How:*
> Always compare and choose the best and lighter library for your needs. You can also use tools like [npm trends](http://www.npmtrends.com/) to compare NPM package downloads counts or [Bundlephobia](https://bundlephobia.com/) to know the size of your dependencies.

* ๐Ÿ›  [ai/size-limit: Prevent JS libraries bloat. If you accidentally add a massive dependency, Size Limit will throw an error.](https://github.com/ai/size-limit)
* ๐Ÿ›  [webpack-bundle-analyzer - npm](https://www.npmjs.com/package/webpack-bundle-analyzer)
* ๐Ÿ›  [js-dependency-viewer - npm](https://www.npmjs.com/package/js-dependency-viewer)
* ๐Ÿ“– [Size Limit: Make the Web lighter โ€” Martian Chronicles, Evil Martiansโ€™ team blog](https://evilmartians.com/chronicles/size-limit-make-the-web-lighter)

- [ ] **JavaScript Profiling:** ![medium] Check for performance problems in your JavaScript files (and CSS too).

*Why:*
> JavaScript complexity can slow down runtime performance. Identifying these possible issues are essential to offer the smoothest user experience.

*How:*
> Use the Timeline tool in the Chrome Developer Tool to evaluate scripts events and found the one that may take too much time.

* ๐Ÿ“– [Speed Up JavaScript Execution ย |ย  Tools for Web Developers ย |ย  Google Developers](https://developers.google.com/web/tools/chrome-devtools/rendering-tools/js-execution)
* ๐Ÿ“– [JavaScript Profiling With The Chrome Developer Tools โ€” Smashing Magazine](https://www.smashingmagazine.com/2012/06/javascript-profiling-chrome-developer-tools/)
* ๐Ÿ“– [How to Record Heap Snapshots ย |ย  Tools for Web Developers ย |ย  Google Developers](https://developers.google.com/web/tools/chrome-devtools/memory-problems/heap-snapshots)
* ๐Ÿ“– [Chapter 22 - Profiling the Frontend - Blackfire](https://blackfire.io/docs/book/22-frontend-profiling)
* ๐Ÿ“– [30 Tips To Improve Javascript Performance](http://www.monitis.com/blog/30-tips-to-improve-javascript-performance/)

- [ ] **Use of Service Workers:** ![medium] You are using Service Workers in your PWA to cache data or execute possible heavy tasks without impacting the user experience of your application.
ย ย ย 
* ๐Ÿ“– [Service Workers: an Introduction ย |ย  Web Fundamentals ย |ย  Google Developers](https://developers.google.com/web/fundamentals/primers/service-workers/)
* ๐Ÿ“– [Measuring the Real-world Performance Impact of Service Workers ย |ย  Web ย |ย  Google Developers](https://developers.google.com/web/showcase/2016/service-worker-perf)
* ๐Ÿ“– [What Are Service Workers and How They Help Improve Performance](https://www.keycdn.com/blog/service-workers/)
* ๐Ÿ“น [How does a service worker work? - YouTube](https://www.youtube.com/watch?v=__xAtWgfzvc)

**[โฌ† back to top](#table-of-contents)**

## Server

![server-side]

- [ ] **Your website is using HTTPS:** ![high]

*Why:*
> HTTPS is not only for ecommerce websites, but for all websites that are exchanging data. Data shared by a user or data shared to an external entity. Modern browsers today limit functionalities for sites that are not secure. For example: geolocation, push notifications and service workers don't work if your instance is not using HTTPS. And today is much more easy to setup a project with an SSL certificate than it was before (and for free, thanks to [Let's Encrypt](https://letsencrypt.org/)).

* ๐Ÿ“– [Why Use HTTPS? | Cloudflare](https://www.cloudflare.com/learning/security/why-use-https/)
* ๐Ÿ“– [Enabling HTTPS Without Sacrificing Your Web Performance - Moz](https://moz.com/blog/enabling-https-without-sacrificing-web-performance)
* ๐Ÿ“– [How HTTPS Affects Website Performance](https://wp-rocket.me/blog/https-affects-website-performance/)
* ๐Ÿ“– [HTTP versus HTTPS versus HTTP2 - The real story | Tune The Web](https://www.tunetheweb.com/blog/http-versus-https-versus-http2/)
* ๐Ÿ“– [HTTP vs HTTPS โ€” Test them both yourself](https://www.httpvshttps.com/)

- [ ] **Page weight < 1500 KB (ideally < 500 KB):** ![high] Reduce the size of your page + resources as much as you can.

*Why:*
> Ideally you should try to target < 500 KB but the state of web shows that the median of Kilobytes is around 1500 KB (even on mobile). Depending on your target users, network connection, devices, it's important to reduce as much as possible your total Kilobytes to have the best user experience possible.

*How:*
> โƒ All the rules inside the Front-End Performance Checklist will help you to reduce as much as possible your resources and your code.

* ๐Ÿ“– [Page Weight](https://httparchive.org/reports/page-weight#bytesTotal)
* ๐Ÿ›  [What Does My Site Cost?](https://whatdoesmysitecost.com/)
* ๐Ÿ›  [web - Measure full page size in Chrome DevTools - Stack Overflow](https://stackoverflow.com/questions/38239980/measure-full-page-size-in-chrome-devtools)

- [ ] **Page load times < 3 seconds:** ![high] Reduce as much as possible your page load times to quickly deliver your content to your users.

*Why:*
> Faster your website or app is, less you have probability of bounce increases, in other terms you have less chances to lose your user or future client. Enough researches on the subject prove that point.

*How:*
> Use online tools like [Page Speed Insight](https://developers.google.com/speed/pagespeed/insights/) or [WebPageTest](https://www.webpagetest.org/) to analyze what could be slowing you down and use the Front-End Performance Checklist to improve your load times.

* ๐Ÿ›  [Compare your mobile site speed](https://www.thinkwithgoogle.com/feature/mobile/)
* ๐Ÿ›  [Test Your Mobile Website Speed and Performance - Think With Google](https://testmysite.thinkwithgoogle.com/intl/en-us)
* ๐Ÿ“– [Average Page Load Times for 2018 - How does yours compare? - MachMetrics Speed Blog](https://www.machmetrics.com/speed-blog/average-page-load-times-websites-2018/)

- [ ] **Time To First Byte < 1.3 seconds:** ![high] Reduce as much as you can the time your browser waits before receiving data.

* ๐Ÿ“– [What is Waiting (TTFB) in DevTools, and what to do about it](https://scaleyourcode.com/blog/article/27)
* ๐Ÿ“– [Monitoring your servers with free tools is easy](https://scaleyourcode.com/blog/article/7)
* ๐Ÿ“– [Time to First Byte (TTFB)](https://varvy.com/pagespeed/ttfb.html)
* ๐Ÿ›  [Global latency testing tool](https://latency.apex.sh)

* [ ] **Cookie size:** ![medium] If you are using cookies, be sure each cookie doesn't exceed 4096 bytes and your domain name doesn't have more than 20 cookies.

*Why:*
> Cookies are exchanged in the HTTP headers between web servers and browsers. It's important to keep the size of cookies as low as possible to minimize the impact on the user's response time.

*How:*
> Eliminate unnecessary cookies.

* ๐Ÿ“– [Cookie specification: RFC 6265](https://tools.ietf.org/html/rfc6265)
* ๐Ÿ“– [Cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
* ๐Ÿ›  [Browser Cookie Limits](http://browsercookielimits.squawky.net/)
* ๐Ÿ“– [Website Performance: Cookies Don't Taste So Good - Monitis Blog](http://www.monitis.com/blog/website-performance-cookies-dont-taste-so-good/)
* ๐Ÿ“– [Google's Web Performance Best Practices #3: Minimize Request Overhead - GlobalDots Blog](https://www.globaldots.com/googles-web-performance-best-practices-3-minimize-request-overhead/)

- [ ] **Minimizing HTTP requests:** ![high] Always ensure that every file requested are essential for your website or application.
* ๐Ÿ“– [Combine external CSS](https://varvy.com/pagespeed/combine-external-css.html)
* ๐Ÿ“– [Combine external JavaScript](https://varvy.com/pagespeed/combine-external-javascript.html)

- [ ] **Use a CDN to deliver your assets:** ![medium] Use a CDN to deliver faster your content over the world.

* ๐Ÿ“– [10 Tips to Optimize CDN Performance - CDN Planet](https://www.cdnplanet.com/blog/10-tips-optimize-cdn-performance/)
* ๐Ÿ“– [HTTP Caching ย |ย  Web Fundamentals ย |ย  Google Developers](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching)

- [ ] **Serve files from the same protocol:** ![high] Avoid having your website serving files coming from source using HTTP on your website which is using HTTPS for example. If your website is using HTTPS, external files should come from the same protocol.

- [ ] **Serve reachable files:** ![high] Avoid requesting unreachable files (404).
* ๐Ÿ“– [How to avoid bad requests](https://varvy.com/pagespeed/avoid-bad-requests.html)

- [ ] **Set HTTP cache headers properly:** ![high] Set HTTP headers to avoid expensive number of roundtrips between your browser and the server.
* ๐Ÿ“– [Using cache-control for browser caching](https://varvy.com/pagespeed/cache-control.html)

- [ ] **GZIP / Brotli compression is enabled:** ![high] Use a compression method such as Gzip or Brotli to reduce the size of your JavaScript files. With a smaller sizes file, users will be able to download the asset faster, resulting in improved performance.

* ๐Ÿ›  [Check GZIP compression](https://checkgzipcompression.com/)
* ๐Ÿ›  [Check Brotli Compression](https://tools.keycdn.com/brotli-test)
* ๐Ÿ“– [Learn more about Brotli Compression](https://www.brotli.pro/)
* ๐Ÿ“– [Can I use... Brotli](https://caniuse.com/#feat=brotli)

**[โฌ† back to top](#table-of-contents)**

---
## Performances and JS Frameworks

### Angular
* ๐Ÿ“– [Angular Performance Checklist](https://github.com/mgechev/angular-performance-checklist)

### React

* ๐Ÿ“– [Optimizing Performance - React](https://reactjs.org/docs/optimizing-performance.html)
* ๐Ÿ“– [React image manipulation | Cloudinary](https://cloudinary.com/documentation/react_image_manipulation)
* ๐Ÿ“– [Debugging React performance with React 16 and Chrome Devtools.](https://building.calibreapp.com/debugging-react-performance-with-react-16-and-chrome-devtools-c90698a522ad)
* ๐Ÿ“– [Build Performant - React](https://web.dev/react/)

### Vue
* ๐Ÿ“– [Vue - Useful Links|Style Guide and Performance](https://learn-vuejs.github.io/vue-patterns/useful-links/)

## Performances and CMS

### WordPress

* ๐Ÿ›  [Test Your Website Speed | WordPress Hosting by @WPEngine](https://wpengine.com/speed-tool/)

#### Articles

* ๐Ÿ“– [19 Tips to Speed Up WordPress Performance (Updated)](https://www.wpbeginner.com/wordpress-performance-speed/)
* ๐Ÿ“– [Speed Up Your WordPress - How to Save Images Optimized for Web](https://www.wpbeginner.com/beginners-guide/speed-wordpress-save-images-optimized-web/)

#### Plugins recommended

* ๐Ÿ›  [Caching Plugin for WordPress - Speed up your website with WP Rocket](https://wp-rocket.me/)
* ๐Ÿ›  [WP-Sweep | WordPress.org](https://wordpress.org/plugins/wp-sweep/)
* ๐Ÿ›  [Imagify Image Optimizer | WordPress.org](https://wordpress.org/plugins/imagify/)

---

## Translations

The Front-End Performance Checklist wants to also be available in other languages! Don't hesitate to submit your contribution!

* ๐Ÿ‡ต๐Ÿ‡น Portuguese: [fernandofawkes/Front-End-Performance-Checklist](https://github.com/fernandofawkes/Front-End-Performance-Checklist)
* ๐Ÿ‡จ๐Ÿ‡ณ Chinese: [JohnsenZhou/Front-End-Performance-Checklist](https://github.com/JohnsenZhou/Front-End-Performance-Checklist)
* ๐Ÿ‡ท๐Ÿ‡บ Russian: [lex111/Front-End-Performance-Checklist](https://github.com/lex111/Front-End-Performance-Checklist)
* ๐Ÿ‡ซ๐Ÿ‡ท French: [WilliamDASILVA/Front-End-Performance-Checklist](https://github.com/WilliamDASILVA/Front-End-Performance-Checklist)
* ๐Ÿ‡ฐ๐Ÿ‡ท Korean: [ParkSB/Front-End-Performance-Checklist](https://github.com/ParkSB/Front-End-Performance-Checklist)
* ๐Ÿ‡ช๐Ÿ‡ธ Spanish: [dagerzuga/Front-End-Performance-Checklist](https://github.com/dagerzuga/Front-End-Performance-Checklist)
* ๐Ÿ‡ป๐Ÿ‡ณ Vietnamese : [huynhan147/Front-End-Performance-Checklist](https://github.com/huynhan147/FrontEnd-Performance-Checklist)
* ๐Ÿ‡ฏ๐Ÿ‡ต Japanese: [GameWith/Front-End-Performance-Checklist](https://github.com/GameWith/Front-End-Performance-Checklist)
* ๐Ÿ‡ต๐Ÿ‡ฑ Polish: [mbiesiad/Front-End-Performance-Checklist](https://github.com/mbiesiad/Front-End-Performance-Checklist)
* ๐Ÿ‡ฎ๐Ÿ‡ท Persian: [ms-fadaei/Front-End-Performance-Checklist](https://github.com/ms-fadaei/Front-End-Performance-Checklist)
* ๐Ÿ‡ฎ๐Ÿ‡น Italian: [marbio/Front-End-Performance-Checklist](https://github.com/marbio/Front-End-Performance-Checklist)

## Contributing

**Open an issue or a pull request to suggest changes or additions.**

## Support

If you have any question or suggestion, don't hesitate to use Discord or Twitter:

* [Chat on Discord](https://discord.gg/btHQRkm)
* [Facebook](https://www.facebook.com/frontendchecklist/)
* [Twitter](https://twitter.com/thedaviddias)

## Author

**Build with โค๏ธ by [David Dias](https://github.com/thedaviddias)

## Contributors

This project exists thanks to all the people who contribute. [[Contribute]](.github/CONTRIBUTING.md).
<a href="https://github.com/thedaviddias/Front-End-Performance-Checklist/graphs/contributors">
<img src="https://opencollective.com/front-end-checklist/contributors.svg?width=890" />
</a>

## Backers

Thank you to all our backers! ๐Ÿ™ [[Become a backer](https://opencollective.com/front-end-checklist#backer)]

<a href="https://opencollective.com/front-end-checklist#backers" target="_blank"><img src="https://opencollective.com/front-end-checklist/backers.svg?width=890"></a>

## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/front-end-checklist#sponsor)]

<a href="https://opencollective.com/front-end-checklist/sponsor/0/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/front-end-checklist/sponsor/1/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/front-end-checklist/sponsor/2/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/front-end-checklist/sponsor/3/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/front-end-checklist/sponsor/4/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/front-end-checklist/sponsor/5/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/front-end-checklist/sponsor/6/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/front-end-checklist/sponsor/7/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/front-end-checklist/sponsor/8/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/front-end-checklist/sponsor/9/website" target="_blank"><img src="https://opencollective.com/front-end-checklist/sponsor/9/avatar.svg"></a>

## License

[MIT](LICENSE)

All icons are provided by [Icons8](https://icons8.com/)

**[โฌ† back to top](#table-of-contents)**

[logo]: images/logo-front-end-performance-checklist.jpg
[html]: images/html.png
[css]: images/css.png
[fonts]: images/fonts.png
[images]: images/images.png
[javascript]: images/javascript.png
[server-side]: images/server-side.png

[low]: images/priority/low.svg
[medium]: images/priority/medium.svg
[high]: images/priority/high.svg