Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dear performant app,

Dear performant app,

Talks the optimisation techniques for your dear frontend application

Nishu Goel

August 03, 2021
Tweet

More Decks by Nishu Goel

Other Decks in Programming

Transcript

  1. Core Web Vitals - loading, - interactivity, - and visual

    stability bit.ly/dear_performant_app
  2. LCP (Largest Contentful paint) 2.5 seconds 4 seconds let’s work

    towards the we need to unblock our render, and make it show up faster
  3. LCP (Largest Contentful paint) 2.5 seconds 4 seconds let’s work

    towards the Inline fonts Inline critical CSS Optimise files Preload important resources Lazy load resources Serve adaptive navigator.connection.effectiveType === '4g' <link rel="stylesheet" href="app.css" media="print" onload=“this.media=‘all’">, critters <link href="https://fonts.googleapis.." rel="stylesheet"> use imagemin, use CDN, responsive images, newer formats (webp, jpeg2000) <link rel="preload"… loading="lazy"
  4. FID (First input delay) 100 ms 300 ms let’s work

    towards the Our page needs to be interaction ready and respond quicker
  5. FID (First input delay) 100 ms 300 ms let’s work

    towards the Defer unused Javascript (code splitting, async/defer) Minimise unused polyfills import {lazy} from “React” const AddEditWebsite = lazy(() => import(‘./add-edit-website')); type=module / nomodule <script defer….. /> <script async….. />
  6. CLS (Cumulative layout shift) 0.1 0.25 let’s work towards the

    Our page elements need to NOT jump and please the users’ eyes
  7. CLS (Cumulative layout shift) 0.1 0.25 let’s work towards the

    Give dimensions to images, iframe etc. elements dynamic content only when user is expecting it bit.ly/dear_performant_app