WordPress.org

Ready to get started?Download WordPress

Forums

Autoptimize
Enabling optimize scripts breaks my homepage (4 posts)

  1. ckubs
    Member
    Posted 1 year ago #

    My theme is designet WP8 metro like and the homepage is a static page with tiles(that have various shortcode content in them, float masonry style upon browser resizing ...etc).

    This plugin is great except one thing, if I want to enable Optimize JavaScript Code too it breaks my layout and some content(like posts slider) is missing from the tiles like in the attached printscreen. http://i.imgur.com/T9iUmTa.png

    Here is my page to see how it looks with that feature disabled.

    Ah, and one small question: On cache info I have Do not compress cached files and on the description Disabled by default. Enable this if you want to compress the served files using your webserver. . I don't understand it too well, this has something to do with Gzip compression if I have already enabled it from my Cpanel?

    http://wordpress.org/extend/plugins/autoptimize/

  2. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Ckubs;
    I'm afraid Autoptimize is not (always) an "install and forget" plugin; especially javascript-heavy blogs will need tweaking in the admin pages.

    This info in the FAQ might help;

    After having installed and activated the plugin, you'll have access to an admin page where you can to enable HTML, CSS and JavaScript optimization. According to your liking, you can start of just enabling all of them, or if you're more cautious one at a time.

    If your blog doens't function normally after having turned on Autoptimize, here are some pointers to identify & solve such issues:
    * In case your blog looks weird, i.e. when the layout gets messed up, there is problem with CSS optimization. In this case you can turn on the option "Look for styles on just head?" and see if that solves the problem.
    * In case some functionality on your site stops working (a carroussel, a menu, the search input, ...) you're likely hitting JavaScript optimization trouble. Enable the option "Look for scripts only in head?" and try again. Alternatively -for the technically savvy- you can exclude specific scripts from being treated (moved and/ or aggregated) by Autoptimize by adding a string that will match the offending Javascript. Identifying the offending JavaScript and choosing the correct exclusion-string can be trial and error, but in the majority of cases JavaScript optimization issues can be solved this way.
    * If you can't get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.

    hope this helps,
    frank

  3. ckubs
    Member
    Posted 12 months ago #

    With autoptimize activated I only get that error only when I enable optimize Javascript. With CSS I have no problem.

  4. futtta
    Member
    Plugin Author

    Posted 12 months ago #

    well, in that case this part should be applied;

    Enable the option "Look for scripts only in head?" and try again. Alternatively -for the technically savvy- you can exclude specific scripts from being treated (moved and/ or aggregated) by Autoptimize by adding a string that will match the offending Javascript. Identifying the offending JavaScript and choosing the correct exclusion-string can be trial and error, but in the majority of cases JavaScript optimization issues can be solved this way.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic