Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #49951
    LEO ASINOVSKI
    Guest

    Hello,
    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,
    Leo

    #49980
    Marko Vasiljevic
    Keymaster

    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!

    Thanks!

    #50035
    LEO ASINOVSKI
    Guest

    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 https://www.giftofspeed.com/)
    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/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>

    #50089
    Marko Vasiljevic
    Keymaster

    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 https://www.semiconsoft.com/wp2/ or https://www.semiconsoft.com/ because the website redirects to https://www.semiconsoft.com/wp2/
    I would also disagree that the website is loading slow as the TTFB is 280ms which is very fast.
    Thanks!

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