Google's PageSpeed Service Takes On CloudFlare with Caching and Optimization

The latest addition to the service optimizes pages to load visible content first

By on August 3rd, 2012 15:21 GMT

CloudFlare is not the only service out there promising to speed up your site. Google, the original speed king, is working on a very similar service. It's in private beta now, but it's getting better and ready for a broader rollout. Dubbed PageSpeed service, it offers several ways of optimizing your site to make it faster.

The main benefit comes from caching, having your site mirrored on Google's servers, to make sure it gets to your visitors as fast as possible no matter where they're coming from.

But Google doesn't stop at that, it rewrites parts of your site to optimize for speed. The PageSpeed Service has just gotten another of these tools, dubbed "rewriters," which is designed to optimize a page for the initial load.

The idea is to have the things that users see first actually load first and leave the background stuff at the end. It seems obvious, but that's not how most web pages work.

The new rewriter is called "Cache and Prioritize Visible Content." The rewriter works in several ways, maximizing the amount of HTML code that can be cached, prioritizing the visible content and deferring JavaScript.

"Typically, most web pages are not cached because they contain small amounts of personalized information or other non-cacheable data. This rewriter separates the non-cacheable portions from the HTML and enables caching for the rest of the content on PageSpeed servers," Google explains.

"When the page is loaded, PageSpeed servers send the cacheable parts immediately while non-cacheable parts are fetched from the origin server & patched into the browser later," it adds.

Beyond that, the rewriter determines what content the user is actually going to see first, i.e. what's above the fold, and sends that first. It also delays JavaScript execution to enable the static content to load first.

This means that users will see something sooner than before, even if the site loads in pretty much the same time, overall. Perceived speed is just as important as actual speed, if not more important in many cases. People being subjective creatures will be more annoyed by a site they feel as slow rather than one that is measurably slow.

PageSpeed Service is free, for now, but it's only open to some websites. You can try to get into the early program by requesting an invite, but there's no guarantee you'll be allowed.