Hacking Both Ends

When you control the server and client sides of an application you can come up with some impressive performance hacks. Facebook’s changes to preview photos is a good example of that:

There are a few tables within the JPEG header, which accounts for its size. The question then became: Would it be possible to generate a fixed header that could be stored on client and therefore not need to be transmitted? In that scenario, only the payload would need to be sent, which would make this the winning format. The investigation began.

For some slow cases they were able to improve page load performance by 30 percent.