This is an old revision of the document!


Server Push supported on LiteSpeed Web Server

Server Push is a method of information delivery where a server pushes a resource directly to the client without first receiving a request to do so. By doing this the server can attempt to anticipate client requests and pre-push them into the client’s cache in an effort to avoid the usual request-response round trip delay.

  1. LiteSpeed Enterprise 5.2+
  2. Site use HTTPS
  3. Browser support HTTP/2

We are going to introduce how to verify Server Push with WordPress+LScache Site then with CloudClare. If you want to try server push and file making by yourself, please refer Server Push.

Install WordPress and LSCache

Verify browser support HTTP/2

Configure LSCache to use Server Push

  1. Navigate to WordPress Control Panel>LSCache>Settings>Optimize tab
  2. Set CSS HTTP/2 Push and JS HTTP/2 Push as On

Verify Server Push

We are going to use Chrome developer tool as our verification tool.

  • If you only enable CSS HTTP/2 Push. Header will looks like this:

  • If you enable both CSS HTTP/2 Push and JS HTTP/2 Push. Header will looks like this:

Configure CDN to serve with Server Push

Why we use CloudFlare? Cloudflare supports HTTP/2 Server Push with the Link header field on all plan levels. Cloudflare will look for the Link header field, in response headers from the origin server and extract URI-references with parameters rel=preload. These URI will be pushed to the client.

Follow this blog to Setup CDN from LSCache

  • If you only enable CSS HTTP/2 Push. Header will looks like this:

  • If you enable both CSS HTTP/2 Push and JS HTTP/2 Push. Header will looks like this:

  • Admin
  • Last modified: 2017/10/24 12:47
  • by Eric Leu