It’s being a while since I joined the Igalia’s WebKitGtk+ team. Mainly focused on network stuff, I managed to tackle several issues during this time although nothing like what I call “the one”.
Last week, after really a lot of work, we landed the patches that add HTTP cache support to WebKitGtk+. It all started in libsoup. The idea was to create an HTTP cache inside libsoup using the new-io branch started by Dan during the past WebKitGtk+ hackfest. Having that into libsoup is great as it potentially benefits the whole GNOME platform. So taking Xan’s SoupCache draft as basis, I started to port it to the new architecture while fixing some bugs and implementing missing features here and there.
It turned out that the underlying new-io code was not mature enough to land in libsoup’s master nor even to be vaguely stable yet. So the WebKitGtk+ team considered that the most sensible solution would be to temporarily import all that new code in WebKitGtk+. And that’s preciselly what we did. WebKitGtk+ has now a new API that will allow any client to enjoy HTTP caching.
If you want to know how to use it, you can take a look at the patch I also submitted for epiphany. As you can see it’s pretty simple, just create a SoupCache object and add it to the session like any other SoupSessionFeature.
Note that this new API will be most likely removed as soon as libsoup equivalent is ready, but having it inside WebKitGtk+ in the meantime definitely worths it.