by cbr · 12y ago · 0 comments
Here's a slightly modified MPS config that gets you to
100 without any manual work:
ModPageSpeed on
ModPagespeedRewriteLevel CoreFilters
ModPagespeedEnableFilters prioritize_critical_css
ModPagespeedEnableFilters defer_javascript
ModPagespeedEnableFilters sprite_images
ModPagespeedEnableFilters convert_png_to_jpeg
ModPagespeedEnableFilters convert_jpeg_to_webp
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters remove_comments
-- https://github.com/danriti/bootstrap-pagespeed/issues/4mod_pagespeed can automate all those complicated steps.
(Disclaimer: I work on mod_pagespeed and ngx_pagespeed.)
The basic problem is that javascript expects to run at a certain time and at a certain point in the page so we have to do all sorts of crazy things in the background to make that appear to be the case when it isn't. This fixes many of the pages (document.write works) but there are enough ways for javascript to be introspective that we can't catch everything.