YouTube home page slow to load initially
search cancel

YouTube home page slow to load initially

book

Article ID: 254608

calendar_today

Updated On:

Products

ISG Proxy

Issue/Introduction

The initial loading of the YouTube home page https://www.youtube.com/ can take ten or more seconds when accessing the page through the ProxySG with SSL Interception enabled/HTTPS forward proxy.

 

Environment

- SSL Interception/HTTPS forward proxy

- Cachepulse is enabled

Cause

The YouTube home page relies on the Brotli compression method. The Cachepulse service applies policy that removes Brotli compression - "br" - from the accept-encoding HTTP request header before sending the request to the Origin Content Server(OCS). This causes the content to be sent uncompressed which can take longer on the initial load of the page.

Resolution

The Brotli compression method was added to SGOS 7. If you are running SGOS 7, then you can address the slow delivery of the page by applying the following policy to override the Cachepulse rule.

In a Web Access layer in Visual Policy Manager that will match the YouTube home page:

  • Action > Set > Control request header > "Set value"
  • Header Name: "Accept-Encoding"
  • Value: "gzip, deflate, br"
  • Click Apply > set > Apply policy

In SGOS 6, Brotli compression is not supported so there is no fix to the slow initial loading of the page. Once the page is cached, subsequent access of the YouTube home page should load quickly. If the cached page expires, then the loading time may be long again until it is cached once more.

 

 

Additional Information

One of the first resources loaded when accessing www.youtube.com is the Javascript file "desktop_polymer.js" which is approximately 9 MB in size.

The same file compressed by the Brotli compression method is only about 1.5 MB in size.

The Brotli compression method is the only compression type that is accepted by www.youtube.com.

If the Brotli compression Accept Encoding header is missing the loading time of the page significantly increases.