Support » Plugin: Autoptimize » [Violation] ‘setTimeout’ handler took 85ms | auto optimize JS CACHE

  • Resolved 123nadav

    (@123nadav)


    Hey, i install cache enabler with autoptimize and nginx, from the minute i install cache enabler i get autoptimize cache script with a violation and google chrome browser after i am refreshing the page.

    autoptimize_0faae6e14c06ce5fda142895e39a52f6.js:2 [Violation] ‘setTimeout’ handler took 85ms

    or

    [Violation] Forced reflow while executing JavaScript took 44ms

    this usually this script:
    https://locksmithunit.es/wp-content/cache/autoptimize/js/autoptimize_0faae6e14c06ce5fda142895e39a52f6.js

    i believe is jquery when we block him with autoptimize. and all the cache together will show the real execution time of jquery (deprecated).

    please help 🙂

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

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    AO simply combines your theme + plugins JS 123nadav, so the setTimeout & reflow are issues with one of your original JS-files and can’t be removed/ fixed by AO. You can try finding out which one(s) is (are) to blame by re-testing with AO disabled by opening https://locksmithunit.es/?ao_noptimize=1

    hope this clarifies,
    frank

    first, i didn’t blame autoptimize, i blame cache enabler 😉

    i know you are a kind of partners, if you can look at my site and refresh help me to bypass
    it with one of them i will appreciate this 🙂

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    no, it’s not CE either, it’s your site’s original JS. no way to fix with AO or CE or .. you’ll have to identify the original JS doing that and contact the developers of those 🙂

    123nadav

    (@123nadav)

    OK, SO YOU NOT RIGHT…
    I COMEBACK AFTER THE LAST UPDATE OF CACHE ENABLER AND THIS START BE WORST:
    https://ibb.co/bNjsS2X

    IF YOU AND THEM ARE PARTNERS YOU SOULD HELP ME AFTER YOU CLAIM IS NOT CONNECTED.
    NOW I ASSURE YOU, YOU WRONG AND I NEED HELP EMERGENCY THIS ERROR ON ALL MY SITE AND THIS START TO BE THE SAME ERROR DOUBLE x20 FROM THE LAST UPDATE OF CACHE ENABLER.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    first of all; please don’t use all caps, it’s not cool 🙂

    next; this is part of “verbose logging” so technically speaking these are not JavaScript errors or warning (meaning everything works). the messages report on non-breaking issues, in this case some JS taking longer to execute. specifically; you have JS using setTimeout (which is used to have a JavaSript task wait) and that setTimeout is running multiple times and each time waits (approx.) 100ms (1/10th of a second). Now as I wrote; this likely is part of some plugin on your site and I can’t tell you which one, but I can tell you Autoptimize does not have JS setTimeout in the code and neither does KeyCDN cache enabler

    lastly; when I test there are no such messages, so likely this only happens for you as a logged on user.

    hope this clarifies,
    frank

    refresh the page you will get it. this “reflow” the javascript.. part from cache enabler cache and i not successfully get rid of that…

    the last update of them causes me a lot of problems… i try everything even there custom configuration:
    https://www.keycdn.com/support/wordpress-cache-enabler-plugin#advanced-configuration

    i try everything with my nginx. i have engintron for c-panel i sure you know what i talking about.

    everything was perfect before 3 updates of Cache enabler.
    now i got problems with all the 3…

    try the advance configuration only in apache and only in nginx.
    for the final, i try full with both…
    (nginx and apache advance configuration FROM THE LINK I SENT YOU ABOVE)

    BYPASS cache and more techniques nothing not works…

    try separate and bypass Autoptimize cache enabler and nginx did not work as well…
    a lot of blocking and reflow JS…
    is come when you refresh the pages…

    EVEN ON INCOGNITO MODE.

    • This reply was modified 4 weeks, 1 day ago by 123nadav.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    as I wrote; you will have to search your JS (easiest is disabling Autoptimize by adding ?ao_noptimize=1 to the URL) for setTimeout and try to find out where that comes from.

    this *really* is not something that can be caused by or fixed with Autoptimize.

    is autoptimize, is Cache enabler.
    i know you work together, and their support is terrible.
    you all the time answer and help this the reason i try here.

    try with them as well:
    https://wordpress.org/support/topic/violation-settimeout-handler-took-99ms/

    and another one:
    https://wordpress.org/support/topic/you-destroy-the-plugin-or-what-plugin-performance-is-terrible-3-last-updates/

    pointless… this way i try with you.
    maybe nginx? is better to bypass cache enabler? or autoptimize? i don’t know what to do for removing this reflow comes from the Cache Enabler cache…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, if you’re convinced the setTimeout is due to Cache Enabler (I am not, on the contrary) you could always try another page cache? speed booster pack is one of my new favorites and they have great support 🙂

    I wish it was easy… i buy the Optimus for replacing png with webp…
    work only with cache enabler… 🙁

    i must utilize that… i think i mod headers and cache control with their plugin
    maybe make double cache…
    if you interesting help me i can publish the htacssas maybe you be able to see what wrong.

    and i appreciate that you help me with another plugin…
    is not obvious… it shows you have a lot of knowledge.

    You right, and i know that before i post here as well, Autoptimize never let me down i can assure you that.

    and i use even another costume plugin of yours
    “Autoptimize Gzip”

    all your plugins are high quality, I never replace Autoptimize for almost 3 years, and i recommended
    any time to my friend as all and i by myself use on all my website.

    sorry if i was sound a little bit attacking, but i want you to be aware.
    i think your plugin is the number 1 plugin in optimization must be in any site.

    Thank you again if you will continue to help or not. ( on your attention )

    Regards
    Nadav Yahel Levi
    Locksmith Unit

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    mod_headers/ cache control only ensure browsers know they can keep static resources (css/ js/ images/ …) in browser cache, but it does not create a server-side cache Zo and it is most certainly not related to the setTimeout issue you’re looking into 🙂

    I found that…
    This Cache enabler, they change the bypass AND add new string options…

    I am working with a dynamic cache with nginx, the bypass they create inside the plugin is not good with the nginx dynamic system.

    Cache Enabler Team tries to bypass new stuff with the plugin.
    _____________________________

    my system work like this

    Static Blocks – all the cookies get inside the only thing i by pass is that:

    # Admin sections for CMSs
    if ($request_uri ~* “(/administrator|/wp-admin|/wp-login.php)”) {
    set $CACHE_BYPASS_FOR_STATIC 1;
    }

    AFTER THAT I HAVE DYNAMIC @backend BLOCK ON THE TOP OF THE STATIC CLOCKS:
    #############################################################################################
    # ADVANCED USERS ONLY:
    # This setting is for cPanel servers with only one to a few sites & NO user-generated content
    # in the frontend (no forums, no e-commerce sites, no user logins!) – you have been warned!
    # Use the time defined in “$EXPIRES_FOR_DYNAMIC” to force client-side caching on dynamic content
    # (set to 1m by default). To enable, uncomment all lines located at the bottom of this file.
    # You can also raise “proxy_cache_valid” to the same value (e.g. “1m”) to force longer
    # server-side caching.
    # The combination of these settings will have Nginx serve all content without issuing requests
    # to Apache except only when it’s required to refresh its cache.
    ____________________________________________________________________________

    set $EXPIRES_FOR_DYNAMIC 1m;

    #############################################################################################

    # Allow separate cache entries for mobile devices (smartphones & tables)
    set $MOBILE “”;
    if ($http_user_agent ~* “(iPhone|iPod|iPad|Android|Mobile|Tablet|Googlebot\-Mobile|AdsBot\-Google)”) {
    set $MOBILE “m_”;
    }

    # CMS (& CMS extension) specific cookies (e.g. Joomla, K2 for Joomla, WordPress, WooCommerce, PrestaShop, Magento etc.)
    if ($http_cookie ~* “(joomla_[a-zA-Z0-9_]+|userID|wordpress_(?!test_)[a-zA-Z0-9_]+|wp-postpass|comment_author_[a-zA-Z0-9_]+|woocommerce_cart_hash|woocommerce_items_in_cart|wp_woocommerce_session_[a-zA-Z0-9]+|sid_customer_|sid_admin_|PrestaShop-[a-zA-Z0-9]+|SESS[a-zA-Z0-9]+|SSESS[a-zA-Z0-9]+|NO_CACHE|external_no_cache|adminhtml|private_content_version)”) {
    set $CACHE_BYPASS_FOR_DYNAMIC 1;
    set $EXPIRES_FOR_DYNAMIC 0;
    }

    # Invision Power Board (IPB) v3+
    if ($cookie_member_id ~ “^[1-9][0-9]*$”) {
    set $CACHE_BYPASS_FOR_DYNAMIC 1;
    set $EXPIRES_FOR_DYNAMIC 0;
    }

    # Invision Power Board (IPB) v4+
    if ($cookie_ips4_member_id ~ “^[1-9][0-9]*$”) {
    set $CACHE_BYPASS_FOR_DYNAMIC 1;
    set $EXPIRES_FOR_DYNAMIC 0;
    }
    if ($http_cookie ~ “ips4_IPSSessionFront”) {
    set $CACHE_BYPASS_FOR_DYNAMIC 1;
    set $EXPIRES_FOR_DYNAMIC 0;
    }

    # Admin sections & generic entry points for CMSs (incl. Joomla, WordPress, phpBB, Drupal, Craft)
    if ($request_uri ~* “(/administrator|com_user|com_users|com_contact|com_mailto|/component/user|/component/users|/component/contact|/component/mailto|/installation|/wp-admin|/wp-login.php|/cart|/my-account|/checkout|/wc-api|/addons|/lost-password|\?add-to-cart=|\?wc-api=|/ucp.php|^/status\.php|^/update\.php|^/install\.php|^/apc\.php$|^/apcu\.php$|^/admin|^/admin/.*$|^/user|^/user/.*$|^/users/.*$|^/info/.*$|^/flag/.*$|^.*/ajax/.*$|^.*/ahah/.*$|^/system/files/.*$|p=admin|/actions|/login|/logout|/connect|/signin|/signup|/register)”) {
    set $CACHE_BYPASS_FOR_DYNAMIC 1;
    set $EXPIRES_FOR_DYNAMIC 0;
    }

    # Disable caching when the “Cache-Control” header is set to “private”
    if ($http_cache_control ~* “private”) {
    set $CACHE_BYPASS_FOR_DYNAMIC 1;
    set $EXPIRES_FOR_DYNAMIC 0;
    }

    # Proxy cache settings
    proxy_no_cache $CACHE_BYPASS_FOR_DYNAMIC;
    proxy_cache_bypass $CACHE_BYPASS_FOR_DYNAMIC;

    proxy_cache engintron_dynamic;
    proxy_cache_background_update on;
    proxy_cache_key “$MOBILE$scheme$host$request_uri”;
    proxy_cache_lock on;
    proxy_cache_methods GET HEAD;
    proxy_cache_use_stale error timeout invalid_header updating http_429 http_500 http_502 http_503 http_504; # Additional options: http_403 http_404
    proxy_cache_valid 200 1m;

    # Ignore all headers but “Cache-Control” to determine whether to cache the upstream response or not
    proxy_ignore_headers Expires Set-Cookie Vary;

    # Force client-side caching for dynamic content (commented by default)
    # See “ADVANCED USERS ONLY” note at the top of this file
    expires $EXPIRES_FOR_DYNAMIC;
    proxy_hide_header Cache-Control;
    proxy_hide_header Expires;
    proxy_hide_header Pragma;
    proxy_hide_header Set-Cookie;
    proxy_hide_header Vary;

    THERE HE bypasses ONLY PHP AND ADMIN LOGIN AND COOKIES WITH 200, THIS A METHOD AGAINST TTFB LIKE THAT ALL THE RESPONS ARE FULLY RESPONSE.

    NOW I DONT KNOW BUT I KNOW IS SOMETHING HERE IN CACHE ENABLER PLUGIN:
    screenshot: https://ibb.co/R6L42ss

    I know is a lot.
    but please, you the only one answer me, they not answer and the support is trouble. i cant move from them because i already buy the OPTIMUS plugin.
    please save me, if needed i will even hire you if don’t have any choice.

    Regards,
    Nadav Levi Yahel
    Locksmith Unit LLC

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    afraid I don’t know enough about nginx to be of help here Nadav, sorry :-/

    but: if you’re using nginx to cache, why do you still need cache enabler?

    webp… google love it.

    btw i think i found the problem. is gclid and the expires in the plugin.
    to the plugin, don’t have mime type.
    so you cant actually use expire with the plugin, especially if you use mod expire inside
    the htacsses.

    the second is gclid.
    they bypass gclid something can hepend… especially with nginx.
    everything needs to get inside nginx, included gclid and cache enabler cache…

    they change the wp-advance.php as well…
    they have a good plugin but they all the time do pointless updates and destroy
    the performance.

    now they good with nginx.. don’t get me wrong. even CENTIMOD recommended on you and them
    together with nginx. (is help and good the only problem is the last 3 updates)

    for now, i succeed to get rid of gclid. and cache enabler cache him right now, i get better results but is too soon to say it, i need to wait at least 4 hours and then run tests.

    i will update.
    you can see i even try them again:
    https://wordpress.org/support/topic/no-support-i-post-3-posts-no-body-answer/

    another one old i response now
    https://wordpress.org/support/topic/x-cache-handler-php-and-not-wp/

    i delete cache enabler… better, autoptimize alone do all the job better and faster.
    you can mark it on solve.

    • This reply was modified 2 weeks, 3 days ago by 123nadav.
Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.