slides.com/joekarlsson | @joekarlsson1
http://glinden.blogspot.com/2006/11/marissa-mayer-at-web-20.html
2015
2015
Source: http://glinden.blogspot.com/2006/11/marissa-mayer-at-web-20.html
we’ve decided to take site speed into account in our search rankings
Source: https://webmasters.googleblog.com/2010/04/using-site-speed-in-web-search-ranking.html
Delay | User reaction |
---|---|
0 - 100 ms | Instant |
100 - 300 ms | Feels sluggish |
300 - 1000 ms | Acceptable for changing views |
> 1 s |
Mental context switch |
> 10 s |
Frustrated, leave, may or may not return |
https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-performance/rail
Available in Chrome DevTools, as a Chrome Extension, as a Node.js module, and within WebPageTest.
Runs a series of audits on the page, and then gives you a report on load performance, as well as suggestions on how to improve.
You can increase the performance of your website by caching these files on servers closer to where your users are. This offloads the traffic from your servers and makes your site load faster.
Pros of PNG
Cons of PNG
Pros of JPEG
Cons of JPEG
Pros of SVG
Cons of SVG
<img src="logo.small.png"
srcset="logo.large.png 1024w, logo.medium.png 640w, logo.small.png 320w"
sizes="(min-width: 36em) 33.3vw, 100vw"
alt="DevLeague">
https://responsiveimages.org
https://code.facebook.com/posts/991252547593574/the-technology-behind-preview-photos/
this helped speed up profile and page loads by 30 percent
https://code.facebook.com/posts/991252547593574/the-technology-behind-preview-photos/
...what happens in the intermediate steps between receiving the HTML, CSS, and JavaScript bytes and the required processing to turn them into rendered pixels
load html > load resources > parse > display
</body>
html starts parsing
hits <script>
html pauses parsing
download js (if external)
execute js (blocks)
html continues parsing
html starts parsing
hits <script>
html continues parsing
while downloading js (if external)
html finishes parsing
deferred js executes in order
html starts parsing
hits <script>
html continues parsing
while downloading js (if external)
html pauses parsing to execute js
html completes parsing
if it doesn't depend on script order
http://www.growingwiththeweb.com/2014/02/async-vs-defer-attributes.html
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
(typically) some javascript will load an image when it comes into the browsers viewport instead of loading all images at page load.
Include only the minimum css/content/scripts necessary for the amount of page that would be rendered in the users browser first to display as quickly as possible
Options allows you to control how webpack notifies you of assets and entry points that exceed a specific file limit.
Devs: Advocate for performance
Product: Allow devs time to work on performance