We regularly see misunderstandings following a performance report analysis produced by Google PageSpeed Insight, GtMetrix, Pingdom or Dareboost.
These misunderstandings usually come from two points:
- many recommendations have become obsolete for HTTP / 2 sites
- these tools report errors related to third-party domains that are out of control of the site owner.
The transition to HTTP / 2 changes the situation.
We hosted a talk from Paris Webperf meetup dedicated to the change made by HTTP / 2.
Dareboost summarizes the impact of the recommendations :
- CSS Sprites, concatenation of CSS or JS files
Any front-end developer will have heard about it: grouping CSS files, JS files, or small images together can limit the number of HTTP requests and thus speed up the loading. What was beneficial in HTTP / 1 may ultimately go against a good user experience in HTTP / 2: the TCP connection is unique and multiplexed, by grouping the files, you will notably lose the benefits of priority on the different streams!
It should be noted that the first feedback on the use of HTTP / 2 seems to show that the use of micro-files should be avoided anyway. If this is your case, partially apply the concatenation principle can remain interesting!
- Cookie-less Domains
- Domain Sharding
Another "hack" HTTP / 1, the domain sharding is to distribute the resources of a web page on several domains, to overcome the limitation of parallelization HTTP requests of web browsers. Because this limit is associated with the domain, not the server, it can be avoided by using multiple domains. Again, this involves TCP connections and additional DNS resolutions. Again, HTTP / 2 solved the initial problem, thanks to multiplexing this time!
- Inlining CSS, JS or base64 images
It should be noted that inlining for the purpose of optimizing the critical path can be eliminated for the use of Server Push, although it must be borne in mind that this mechanism remains relatively experimental.
Parallelize downloads across hostnames :
This optimization is not applied by the engine in HTTP / 2. The indicator is no longer to be taken into account in this case.