Shared Domains

PageSpeed Service was turned off on August 3rd, 2015. Please see Turndown Information for PageSpeed Service.

Objective

Minimize round-trip times by parallelizing downloads across hostnames.

PageSpeed rule

This rewriter implements the PageSpeed rules for minimizing round trip times.

Description

This rewriter increases the number of resources fetched in parallel by the browser, by sharding requests from the same domain to different *-pss.googleusercontent.com domains. Since each resource is consistently sharded to the same googleusercontent.domain shard, the browser cache hit rate for these resources across different pages of the site is not affected.

This rewriter is enabled by default for all pages served by PageSpeed Service, and is disabled only for pages blacklisted in the Rewriter Settings pane of the Google APIs Console.

Operation

This rewriter parses the HTML document and finds all proxied and combined resources (images, CSS and JavaScript) and shards these to use different *-pss.googleusercontent.com domains so that more resources are fetched in parallel.

Example

The example below shows the HTML before rewriting:

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="styles/yellow.css">
  </head>
  <body>
    <script src="scripts/example.js"> ...
    <img src="images/Puzzle.jpg">
  </body>
</html>

and after rewriting:

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="http://1-www-accel-pss.googleusercontent.com/gadgets/concat?gadget=www.pssdemos.com&1=http://www.pssdemos.com/new/styles/yellow.css">
  </head>
  <body>
    <script src="http://3-www-accel-pss.googleusercontent.com/gadgets/concat?gadget=http://www.pssdemos.com&1=http://www.pssdemos.com/scripts/example.js&json=json1327969143">
    </script>
    <script>eval(json1327969143[‘http:\/\/www.pssdemos.com\/scripts\/example.js’]);</script>
    <img src="http://3-www-accel-pss.googleusercontent.com/gadgets/proxy?gadget=http://www.pssdemos.com&url=http://www.pssdemos.com/new/images/Puzzle.jpg">
  </body>
</html>