Optimizing the Critical Rendering Path for Instant Mobile Websites - Velocity SC - 2013

Ilya Grigorik · 37K views · 2013 · 44:44

Open on YouTube

Web developmentSoftware performance & optimizationNetworking & internet infrastructuretalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when asking or answering questions about PageSpeed Insights, render-blocking CSS and JavaScript, above-the-fold content and flushing HTML early for faster mobile page loads.

Recommended by 2 people across 2 different months, 2013 to 2018.

What it is

A 2013 Velocity conference talk by Google's Ilya Grigorik on optimizing the critical rendering path for fast mobile websites. It covers network round trips, server tuning, prioritizing critical assets and inlining above-the-fold CSS, and demos Google tooling that automates parts of this.

What people said

Recommends Josh Coady · 2013-10 · Stack Overflow · on “What is "above-the-fold content" in Google Pagespeed?”

This is because Google recently changed the page speed tool to better reflect an increasingly mobile web. Mobile data networks have different performance characteristics than wired or wifi so you need to do different things to optimize for them. Above-the-fold (ATF) is simply the first screen's worth--anything you don't need to scroll to see. Obviously, this varies depending on the device and its orientation, so you may need to generalize and maybe find some workable common options, maybe one targeting smartphones, one for tablets, and one for larger desktops. As for what CSS they are talking about, they are really intending all CSS needed to fully style whatever content is displayed ATF. To

Recommends zoid · 2014-05 · Stack Overflow · on “Optimizing above-the-fold CSS”

I want to fix the "Eliminate render-blocking JavaScript and CSS in above-the-fold content" requirement for better PageSpeed Insights [LINK] score but I'm not quite sure what the best approach to this problem is. How can I best balance the page load for new visitors and returning visitors? When should I load my CSS asynchronously, when not? Should I maybe only inline CSS for small screens? Relevant presentation: Optimizing the Critical Rendering Path [this video] Example Since inlining lots of CSS leads to slower page loads on subsequent visits, I could serve different versions for recurring visitors based on a cookie. For detecting above-the-fold CSS I could use the bookmarklet from this article:

Cites Yaniv Efraim · 2014-07 · Stack Overflow · on “Polymer & performance on mobile. Is it ready for production?”

I am thinking of integrating Web Components / Polymer on my mobile web-app. There are two performance major bottlenecks here (as I see it): Polymer's "platform.js" size is 163KB (44KB GZipped). This is pretty big for mobile 3G networks. Polymer claims that their primary goal is performance, while in the same breath Google's best performance practice [this video] is first loading mobile app's critical path with minimum network requests (1 request?) + minimise this request size. If I only want to load non critical components using Polymer I can use async script loading pattern [LINK] . If this is not the case, I will be forced to wait for this script to be loaded until page can start render. Webcom

Cites progonkpa · 2016-12 · Stack Overflow · on “How do you flush HTML in Spring MVC?”

I was watching this O'Reilly Velocity talk to make websites load below 1s. Flushing is the technique they use so I started wondering how to do this in my Spring projects. [this video]

Cites andre mcgruder · 2018-09 · Stack Overflow · on “Why in jquery all of the text field can connect to the Javascript file BUT only one is left out?”

Is the code in your “script.js” file wrapped inside the jQuery function? $(function(){ // your code here. $("#price").on("keyup", function(){ var valid = /^\d{0,4}(\.\d{0,2})?$/.test(this.value), val = this.value; if(!valid){ console.log("Invalid input!"); this.value = val.substring(0, val.length - 1); } }); Also in your file structure be sure the you have you index.html (or whatever you called you html file and then your “JS” folder which has your “script.js” file. This is based on the script path that you used. (js/script.js) It might be best to take all of your custom JS code, put it in your script.js file and just link it at the bottom of the page. I think part of the problem is that you