Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:config:server_push [2017/10/24 19:04]
Lisa Clarke
litespeed_wiki:config:server_push [2020/08/13 20:07]
Lisa Clarke [Disable ''ls_smartpush'' cookie for a particular domain] Editing
Line 21: Line 21:
 There are two easy ways to verify your browser has HTTP/2 support: There are two easy ways to verify your browser has HTTP/2 support:
  
-  - Check your browser version against the table at [[http://​caniuse.com/#​search=http2 | this link]].\\ +  - Check your browser version against the table at [[http://​caniuse.com/#​search=http2 | this link]]. \\ {{:​litespeed_wiki:​config:​push-6.png?​|}} 
- {{:​litespeed_wiki:​config:​push-6.png?​|}} +  - Visit the [[ https://​http2.akamai.com/​demo | Akamai online tool]] and let it auto-detect your browser'​s support. \\ {{:​litespeed_wiki:​config:​push-7.png?​|}}
-  - Visit the [[ https://​http2.akamai.com/​demo | Akamai online tool]] and let it auto-detect your browser'​s support.\\ +
- {{:​litespeed_wiki:​config:​push-7.png?​|}}+
    
 ====Configure LSCache to use Server Push==== ====Configure LSCache to use Server Push====
Line 30: Line 28:
   - Set **CSS HTTP/2 Push** and **JS HTTP/2 Push** to ''​ON''​   - Set **CSS HTTP/2 Push** and **JS HTTP/2 Push** to ''​ON''​
  
-====Verify Server Push is active ​====+====Verify Server Push is Active ​====
 We are going to use the [[https://​developers.google.com/​web/​tools/​chrome-devtools/​network-performance/​reference | Chrome developer tool]] as our verification tool. We are going to use the [[https://​developers.google.com/​web/​tools/​chrome-devtools/​network-performance/​reference | Chrome developer tool]] as our verification tool.
   * If you only enabled **CSS HTTP/2 Push**, the response header will look like this: \\ {{:​litespeed_wiki:​config:​push-1.png?​|}} \\   * If you only enabled **CSS HTTP/2 Push**, the response header will look like this: \\ {{:​litespeed_wiki:​config:​push-1.png?​|}} \\
   * If you enabled both **CSS HTTP/2 Push** and **JS HTTP/2 Push**, the response header will look like this: \\ {{:​litespeed_wiki:​config:​push-2.png?​|}} \\    * If you enabled both **CSS HTTP/2 Push** and **JS HTTP/2 Push**, the response header will look like this: \\ {{:​litespeed_wiki:​config:​push-2.png?​|}} \\ 
 + 
 +css and js files will show as **Push / Other**:
 +
 +{{:​litespeed_wiki:​config:​ls_severpush.png?​800|}}
  
-====Configure CDN to use Server Push====+====Configure CDN to Use Server Push====
 Next we'll try it with [[https://​www.cloudflare.com/​ | 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. \\ Next we'll try it with [[https://​www.cloudflare.com/​ | 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. \\
  
Line 52: Line 54:
  
 We welcome your feedback on our [[https://​www.litespeedtech.com/​support/​forum/​ | forum]]. We welcome your feedback on our [[https://​www.litespeedtech.com/​support/​forum/​ | forum]].
 +
 +==== Disable ls_smartpush cookie for a particular domain ====
 +
 +If you want to disable the ''​ls_smartpush''​ cookie for a particular domain, you can use the ''​SmartPush no-cookie''​ directive in ''​.htaccess''​ starting from LSWS v5.4.2.
 +
 +  <​IfModule LiteSpeed>​
 +    SmartPush no-cookie
 +  </​IfModule>​
 +  ​
 +{{ :​litespeed_wiki:​config:​ls_smartpush_cookie.png?​800 |}}
 +
 +{{ :​litespeed_wiki:​config:​ls_smartpush_cookie_2.png?​800 |}}
 +
 +After you make changes to ''​.htaccess'',​ you will need to restart your browser to avoid getting a cached version. After that, you should see something like the following:
 +
 +{{ :​litespeed_wiki:​config:​ls_smartpush_cookie_disable_cookie.png?​800 |}}
  • Admin
  • Last modified: 2020/10/28 11:50
  • by Lisa Clarke