Reinventing HTTP Caching with Gears
By Adrian Sutton
I’ve seen in a few places people getting excited about the upcoming support for Google Gears in WordPress as a way to locally cache common files so they don’t have to be downloaded repeatedly. For instance, this article from Geniosity Musings:
But, some of the new features (and features I’ve just started using now that I use the Visual Editor) just aren’t as cool thanks to the not-so-great internet speeds in South Africa.
For example, if you want to create a link. Every time you click the link icon in the editor’s toolbar, it has to download the same stuff over and over…
Well, it looks to me like the WordPress Google Gears implementation has solved that. The link and the “insert embedded media” popups are now instantaneous!
Now Google Gears is cool technology and I’m sure there are lots of interesting things you can do with it, but reimplementing HTTP caching seems pretty stupid to me. If your browser is downloading the same stuff over and over, it’s because the server is adding the wrong caching headers and it’s not that hard to fix, without Gears. HTTP includes all these wonderful headers that control what and how things should be cached precisely to speed up the kind of use case mentioned above.
I just hope that it’s easy to turn off the use of gears so life can be kept simple.