Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #49951

    I am getting javascript error on all the pages.
    This error can be seen in the DevConsole in Chrome
    (I tried to include the script but it was blocking the post)
    It seems that this code is generated by W3C. Always the pages are working but WP_Form does not…
    Can you please help me to fix it.
    Thank you,

    Marko Vasiljevic

    Hello Leo,

    Thank you for reaching out and I am happy to assist you with this.
    I’ve checked the website and I can see that W3 Total Cache is enabled. I can also see the Console error:
    Uncaught ReferenceError: asyncloader is not defined
    I can also see that you are using Jetpack to optimize JS and CSS files which may be causing the jQuery not to load properly, as it should for dependent files, especially when using async.
    Can you please disable the optimization for JS and CSS files in the Jetpack performance settings, and see if that helps, and also, try switching the embed method in the Performance>Minify>JS to default (blocking)
    Let me know if this helps!



    Hi Marko,
    Thank you for the quick response.
    Following your recommendations worked and the error was cleared…
    However, now I have very slow loading of the page – it is a problem.
    I checked that I have browser cache enabled in W3 and htaccess file has compression instructions.
    But it look like compression is not working (i checked with
    Below are instructions generated by W3 in htaccess file.
    How do I fix this?

    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/ application/x-msdownload image/x-icon application/json application/ video/webm application/ application/x-font-otf application/ application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/ application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/ image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/ audio/wav application/ application/font-woff application/font-woff2 application/
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml

    Marko Vasiljevic

    Hello Leo,

    Thank you for the information.
    As I can see the compression is enabled and you are using Brotli to compress the files.
    content-encoding: be
    You should also increase the cache-control and expires header for static files such as JS files from max-age=3600 to default 31536000 s
    Can you also please let me know if you are testing or because the website redirects to
    I would also disagree that the website is loading slow as the TTFB is 280ms which is very fast.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘javascript error’ is closed to new replies.