WordPress.org

Ready to get started?Download WordPress

Forums

Autoptimize
[resolved] External Javascript? (9 posts)

  1. wm
    Member
    Posted 11 months ago #

    I use the plugin (no advanced settings) and it helps. But I still got this from Yslow test at http://gtmetrix.com:

    "This page has 10 external Javascript scripts. Try combining them into one. This page has 7 external stylesheets. Try combining them into one."

    Do I need to add some advance setting to fix this or do I need another pluging to complement? Is there any tutorial for the advance settings around?

    https://wordpress.org/plugins/autoptimize/

  2. Frank Goossens
    Member
    Plugin Author

    Posted 11 months ago #

    there's a lot of info in the FAQ WM.

    regarding your question; can you look at the source of a page on your site and check if the are autoptimize_*.js or autoptimize_*.css files referenced in there?

    feel free to provide a link to your blog here (or via mail at futtta-at-gmail-dot-com) so I can have a quick look.

  3. wm
    Member
    Posted 11 months ago #

    Thanks for the FAQ. I find some that refere to external CSS but im not sure what to check in the advanced tab for my issue.

    The page that Im optimizing is http://piani.se/

    I find information in the source regarding autooptimize so someting is working but still the warning in Yslow for external skrips and stylesheets. The main plugin that slows is now probably Woocommerce. The Theme is a Twenty Twelve child theme.

  4. Frank Goossens
    Member
    Plugin Author

    Posted 11 months ago #

    Had a quick look; there are non-optimized css/js files. some of those can't be optimized by autoptimize (e.g. the addthis js/css or the google maps resources), but it seems like you entirely excluded woocommerce from being optimized for both JS and CSS? I don't have real-world experience with WC myself, but based on input from other AO-users, excluding jquery might be enough?

    Outside of the scope of Autoptimize but interesting nonetheless; Google PageSpeed Insights claims you'd better optimize your images. A good plugin that could help there is ewww image optimizer.

    hope this helps,
    frank

  5. wm
    Member
    Posted 11 months ago #

    Thanks for the WC thread link. I added the suggested code at line 26 and my ratings got better.

    Now it says:
    This page has 6 external Javascript scripts. Try combining them into one. This page has 5 external stylesheets. Try combining them into one.

    The last ones I guess is Google fonts and Sitemap scrips. Thanks for fast support and a great plugin. Keep up the good work and I hope developers of scrips out there works a little harder to make clean fast scrips and CSS that can be supported by Autooptimize :-)

  6. wm
    Member
    Posted 11 months ago #

    After some extra tweaking I got up to 99% on pagespeed at http://gtmetrix.com

    But Yslow still lags behind. Dont know if its only a measuring problem or if I acually are suppose to fix external scripts? WHat I understand I have no access to external scripts and that the only sullotion is some CDN fix.

    Is the errors with external scripts not included in Autoptimize? Can another plug in fix this? Or is it external things like googlefonts and add this that is the problem for me that I cant optimize more exept removing the functions?

    "This page has 6 external Javascript scripts. Try combining them into one. This page has 5 external stylesheets. Try combining them into one."

    The site is pretty fast now and with Autoptimize its getting the extra speed I need :-)

  7. Frank Goossens
    Member
    Plugin Author

    Posted 11 months ago #

    Things like social widgets and googlefonts indeed are purely external and can't be optimized by Autoptimize.

    I must say that in general I focus less on ratings and more on real page load time as shown by e.g. webpagetest.org. But 99/100 is superb!

  8. wm
    Member
    Posted 11 months ago #

    Last followup question. If i use the advanced setting "Force script into HTML head" it actually lower my ratings so I dont use this.

    On some test sites i read "standard" advice "Move scripts to the bottom of the page for faster mobile devices". Is that an option in Autoptimize? Or is it already handled in default?

  9. Frank Goossens
    Member
    Plugin Author

    Posted 11 months ago #

    If javascript is not "forced into head" it indeed is at the bottom of the HTML. So you're good to go, basically :-)

Reply

You must log in to post.

About this Plugin

About this Topic