Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While they do point out Ilya's comment in an update, it should be more central:

    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/4

mod_pagespeed can automate all those complicated steps.

(Disclaimer: I work on mod_pagespeed and ngx_pagespeed.)



I've had huuuuge problems with defer_javascript before using specific libraries. If it works it is an amazing help, but I'd carefully bug-test after you implement if you use that filter!


The defer_javascript filter is amazing on some pages and completely breaks others. It's frustrating because it has so much potential, but it's too dangerous for us to turn on by default. If it looks good on your site in testing, though, it's probably fine.

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.


Does mod_pagespeed work with Apache 2.4 now?


Yup. Both the beta and stable versions work with 2.4.


Thank you, I can't wait to try this...


i updated the article to move the inline update to the `2. Enable mod_pagespeed` section as requested =)


Final table no longer makes sense. Might make more sense to extract your update to a new article and link to it from the top?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: