The coming of HTTP/2

Re: The coming of HTTP/2

by Andrew Lyons -
Number of replies: 0
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Ken,

In short, yes - there will be some changes that we can make with mod_spdy available.

I can't remember the full details of all of the changes, but one change would be to disable combo loading.

At the moment, for much of our CSS and JS, we combine multiple files into a single file (this is called combo loading). This is great for reducing the number of trips with HTTP1, but means that sometimes content is less easy to cache. This is because different files will be combined in different orders on different pages. The browser is only aware of the entire combination of pages as a single resource. That is to say that when you request files a, b, and c as a combo-loaded set, you get all three, in that order. The browser knows them as abc. If on another page you get them in a different order, or only get a subset of them (e.g. ab), then your browser doesn't match that set to the one it has in it's cache and goes to fetch ab from the server again.

By switching off this combo loading for spdy connections, we can better cache the content in the browser. The browser will ask for a, b, and c separately and cache them separately. When you go to a different page where only a, and b are used, they can be found in the cache and are served immediately.

With HTTP, combo loading is good because of the cost of round trips, etc. but with the introduction of spdy we can send multiple requests in parallel in a single transaction.

Hope that explains things a little,

Andrew

Average of ratings: Useful (2)