Support » Plugin: Autoptimize » static_gzip – how where when?

  • Resolved mikehaceman

    (@mikehaceman)


    Wow 2.1 look soo much better! Thanks for this update!

    Could explain where ahd how should i insert those codes?

    new: power-users can enable Autoptimize to pre-gzip the autoptimized files by passing true to autoptimize_filter_cache_create_static_gzip, kudo’s to (Draikin)[https://github.com/Draikin] for this!

    Do I just copy it and paste it to my functions.php (i dont want to use snippet plugin you recommended in FAQ)?

    Also could you describe a little bit this pre-gzip functionality and what are the performance benefits here?

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Frank Goossens

    (@futtta)

    you’d have to add something like

    
    add_filter('autoptimize_filter_cache_create_static_gzip','__return_true');
    

    to your child theme’s functions.php (or in a separate mini-plugin of your own).

    the functionality is that with that functionality activated (through the filter), AO will not only create .css and .js files which Apache (and others) can compress on the fly, but also pre-compressed gzipped css and js-files thus avoiding the overhead of the webserver having to compress on the fly.

    in order for this to work, you will have to configure apache (or other) to look for gzipped-files if/ when available as descrived in the 2nd part of this article.

    hope this clarifies,
    frank

    mikehaceman

    (@mikehaceman)

    Hi

    Thank you for the answer. I checked the article and Im little bit confused where and how to implement the “apache” side of things.

    Could this apache bit be all done e.g. via htaccess? So implementation of your static gzip could be more non-power-user friendly?

    Thanks

    Plugin Author Frank Goossens

    (@futtta)

    I have no idea I’m afraid Mike, Apache config is often trial&error in my case and I haven’t tried this out myself 🙂

    mikehaceman

    (@mikehaceman)

    Ok

    I will leave this as beyond my tech-skills. As a suggestion Frank – it would be awesome for average user to have an out-of-the-box software. Only high end users can code in many languages and make things happen. Hopefully you can simplify this world for us and bring simple (one-click type) solutions!

    Best wishes!

    Plugin Author Frank Goossens

    (@futtta)

    the goal of AO is two-fold; powerful optimization using the settings-screen and more technically challenging options for power-users. some functionality might shift from the 2nd to the 1st category at some time though 🙂

    Hi, any ideas how to get this feature working with a Litespeed server?

    Plugin Author Frank Goossens

    (@futtta)

    well, you need to activate the filter (see earlier in this thread), but how you need to (re-)configure litespeed server I could not tell you I’m afraid ..

    frank

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘static_gzip – how where when?’ is closed to new replies.