What is PageSpeed?
It is a tool that optimizes and implements for you the best practices of the web according to Google. It rewrites your website to make it faster for your visitors. It’s automatic and transparent.
It allows to:
- “Minify” HTML, CSS and JavaScript (remove comments, unused code etc …)
- Rewrite the images to lighten their weight
- “Defer” the JavaScript (ie run the JS when the page has finished loading before)
- Remove white spaces
- Caching on the RAM
- Rewrite CSS and JavaScript optimally
- and more! See the full list at https://www.modpagespeed.com/doc/
Which rules should I activate?
When you enable PageSpeed from your World or cPanel control panel, the recommended rules are enabled, commonly called “CoreFilters“. These are widely used rules and are suitable for most websites.
On the “Advanced” section, you can choose more advanced rules. To do this, click on “Configuration”, then “Advanced” and choose the desired rules. We recommend that you consult the official PageSpeed documentation to learn more about each rule and its usefulness.
How to debug in case of worry?
The tool allows a clear and simple debug.
To do this, simply navigate to your favorite browser and then add the debug parameter. See the example below:
https://YourDomainName.com/?PageSpeedFilters=+debug
Then open the source code of the page. You will see several debug comments and at the very end you will see a block similar to
<!--
mod_pagespeed on
Filters:
ah Add Head
cc Combine Css
jc Combine Javascript
gp Convert Gif to Png
jp Convert Jpeg to Progressive
jw Convert Jpeg To Webp
mc Convert Meta Tags
pj Convert Png to Jpeg
ws When converting images to WebP, prefer lossless conversions
db Debug
ec Cache Extend Css
ei Cache Extend Images
es Cache Extend Scripts
fc Fallback Rewrite Css
if Flatten CSS Imports
hw Flushes html
ci Inline Css
ii Inline Images
il Inline @import to Link
ji Inline Javascript
js Jpeg Subsampling
rj Recompress Jpeg
rp Recompress Png
rw Recompress Webp
ri Resize Images
cf Rewrite Css
jm Rewrite External Javascript
jj Rewrite Inline Javascript
cu Rewrite Style Attributes With Url
cp Strip Image Color Profiles
md Strip Image Meta Data
Options:
CssInlineMaxBytes (ci) 32768
EnableRewriting (e) 1
ImageInlineMaxBytes (ii) 32768
JsInlineMaxBytes (ji) 32768
RewriteLevel (l) Pass Through
RunExperiment (fur) False
#NumFlushes 0
#EndDocument after 1273us
#Total Parse duration 1249us
#Total Render duration 6797us
#Total Idle duration 24us
No critical images detected.
The following filters were disabled for this request:
SupportNoscript
-->
Finally, to compare the result with PageSpeed and without PageSpeed, just add the parameter that disables PageSpeed:
https://YourDomainName.com/?ModPagespeed=off