How To Enable PageSpeed In LiteSpeed ADC

Server Level Configuration

Login into LiteSpeed ADC webadmin console, Configuration → Server → PageSpeed

Load Module: This is master switch, must be enabled to activate PageSpeed, otherwise none of following setting will take effect.

Enable PageSpeed: This can be either server level or vhost level , vhost level will override server level.

PageSpeed Settings: PageSpeed settings, this wiki uses following as example:

pagespeed FileCachePath /tmp/lshttpd/pagespeed;
pagespeed RewriteLevel CoreFilters;

Please be aware, improper settings may break content of sites or some static files like JS/CSS.

Vhost Level Configuration

In this example uses same setting as server level setting.

After all settings are configured, graceful restart LiteSpeed ADC to take effect.

Verify it

We can verify PageSpeed by checking the HTTP response header.

This is before PageSpeed is activated, and we can see the page size is 254 KB with 17 requests.

This is after PageSpeed is activated, and we can see the page size has been reduced to 196 KB and requests to 14 requests. Also we can see the x-ls-pagespeed header now.

Should I Turn on Both PageSpeed and LSCache at the Same Time?

If your site uses LiteSpeed Cache , then you would probably wonder , should I turn on both PageSpeed and LiteSpeed Cache at same time?

The answer to this question, please refer this wiki

litespeed_wiki/lslb/pagespeed.txt · Last modified: 2018/07/05 14:55 by Lisa Clarke