• Resolved Vinod Rawat

    (@vinod_41)


    here is recent report.

    https://gtmetrix.com/reports/test.customgiftings.com/hS2XqG7O

    Need help with
    1 defer parsing of javascript and
    2 Leverage browser caching for external sources.

    Also I’m getting 1 error : to load resource: the server responded with a status of 409 () (https://test.customgiftings.com/wp-content/plugins/contact-form-7/includes/js/scripts.js)
    If I disable js minification, error goes away. (I searched forum there are references of blocking by Host, But I don’t think so, as error goes when not minifyed.

    I’m doing Manual mode minification:
    Well for Defer parsing of javascript, here is screenshot : https://prnt.sc/reaslz
    If I add or change other settings, more error show up in console.
    even If I rearrange the load order.
    I’ve to add those min.js files, as if I do not add, it again throws errors. and site misbehaves.

    https://prnt.sc/reavkk

    Kindly assist how to defer those external files.

    — apart from this, Y Slow score if too poor F.
    I’ve spoken to host for connection time, they said it is normal for every shared hosting.
    Make Fewer HTTP request is what I’m looking to fix for now
    “This page has 49 external Javascript scripts. Try combining them into one.

    This page has 5 external stylesheets. Try combining them into one.”

    Thanks

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @vinod_41

    I am sorry about the issues you are experiencing and I am happy to assist you with this.
    I’ve checked your gtmetrix report.
    As for the external files, no plugin can handle those. The problem is that those files are not on your server and W3 Total Cache can only work with the files you have on your server.
    The bottleneck of the performance of your website is your shared hosting and your images. As you can see in the waterfall chart, ?wc-ajax=get_refreshed_fragments are not even loading. You should upgrade your hosting plan because you are using a lot of plugins, a lot of images and ajax calls can also reduce the response time.
    The images need to optimized as suggested by GTmetrix and this will reduce loading time.
    You should avoid adding min.js files to minify as they are already partly minified by the plugin/theme author.
    As for the https://test.customgiftings.com/wp-content/plugins/contact-form-7/includes/js/scripts.js error that you are getting, this means (and it’s recommended_) that you need to exclude that file from being minified as there is a possibility that the form will not work as expected.
    I hope this helps!

    Thread Starter Vinod Rawat

    (@vinod_41)

    Hi Marko,
    Thanks for quick reply and suggestions.
    Here is the latest report: https://gtmetrix.com/reports/test.customgiftings.com/p1MQ0Ddm

    Yes, I’m already working on image optimiazation.
    I’m also surprised website works with this many plugins, already disabled some and I’m also working out to reduce more plugins.
    As suggested, I’ve removed those couple of minified js files.

    any recommendation for this on shared hosting? ?wc-ajax=get_refreshed_fragments

    for Contact form 7 error, I’m not minifying that https://test.customgiftings.com/wp-content/plugins/contact-form-7/includes/js/scripts.js
    but I’ve this wp-includes/js/jquery/jquery.js (different file)

    I’ve tried adding in “never minify following js” and added wp-content/plugins/contact-form-7/includes/js/scripts.js
    (since I’m doing manual minification, I guess this function will not work)

    409 error still there.

    There are these 4 files listed for Defer. Is it possible to deal with them?
    https://test.customgiftings.com/wp-content/cache/minify/5c8cc.default.include.535576.js (162.3KiB)
    https://test.customgiftings.com/?v=3e8d115eb4b3 (9.1KiB of inline JavaScript)
    https://test.customgiftings.com/wp-includes/js/jquery/jquery-migrate.min.js (7.7KiB)
    https://test.customgiftings.com/wp-includes/js/jquery/ui/core.min.js (3.3KiB)

    Thanks

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @vinod_41

    Thank you for the information.
    As for ?wc-ajax=get_refreshed_fragments you should upgrade your hosting plan as the current one is proving to be week for the website you are building and that includes all the Woocommerce options as Woocommerce is using a lot of resources.
    Regarding the minify and defer JS, “never minify following js” will not work as you are using manual minify.
    Manual minify can be tricky as the files need to be added in the correct order and template. So you need to reorder the files and jquery needs to be loaded before other files. Potentially you might need to leave jquery out but again you need to test and combine, adding one file at the time.
    As for the https://test.customgiftings.com/?v=3e8d115eb4b, you can see that there is a string after the URL. This string appears on websites running an online store using WooCommerce. It is not a bug or an error, but an actual feature of the plugin.
    The purpose of this string is to help WooCommerce calculate tax and shipping based on a user’s geographic location. The string helps make the feature compatible with WordPress caching plugins like W3 Total Cache.
    However, if you don’t need to calculate shipping and taxes based on different locations, then you probably accidentally enabled this feature.
    You can disable and remove the random v=xxxxxx strings from your WordPress URLs in WooCommerce ? Settings page.
    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Defer js, minify and browser cache improvement’ is closed to new replies.