I'm Gilbert Pellegrom.

Digg’s Multipart XMLHttpRequests

The developers at Digg have come up with an interesting way to speed up load times of high performance websites. They have taken the idea that reducing the number of HTTP requests per page speeds up website performance, and come up with a technique called MXHR (Multipart XMLHttpRequests). MXHR works by bundling files, sending them through a single request, then separating them for use once they head down the pipe.

They have written a an addition to their Digg User Interface library called DUI.Stream to implement it. Specifically, DUI.Stream opens and reads multipart HTTP responses piece-by-piece through an XHR, passing each chunk to a JavaScript handler as it loads. This will then allow developers to drastically improve the speed of uncached page loads by bundling most of their resources into a single HTTP request, with a single time-to-first-byte and no request throttling by the user agent.

There are two demo’s you can view at the moment (remembering this is still in alpha development). However the demo that handles images is particularly impressive. (IE doesn’t seem to play nice). Demo1, Demo2.

If you are interested you can find out more about MXHR and the DUI.Stream on Digg’s blog post.

One Comment

  • Artem Russakovskii 9 months, 2 weeks ago

    Demo2: 300 uncached images

    MXHR Stream Stream took: 21652ms
    Normal Normal, uncached took: 20980ms

    Heh, and the MXHR nearly killed my Firefox in CPU. No thanks for now, Digg. Nice idea, nonetheless.

Your Opinion

(required)

(will not be shared & is required)