Hello @miimie
Thank you for reaching out and I am happy to assist answer.
In JavaScript, async is a keyword placed before a function to allow the function to return a promise. Since JavaScript is an asynchronous language, Async functions let us write promise-based code as if it were synchronous, but without blocking the execution thread that allows the code to run asynchronously.
In W3 Total Cache only minified files can be loaded with async or defer.
In most cases, jquery has dependant files which means that it should load before other files.
Async helps, in this case, to allow jquery to load asynchronously and therefore faster and nonblocking.
If you do not have any console errors related to jquery and if you are not experiencing any issues on the website, there is nothing to worry about.
You can always share your website URL.
Thanks!
Thread Starter
Vegsur
(@miimie)
Thank you for your time and answer, very helpful! 🙂 I cant notice any errors in the site but feels like after putting that async, google is giving me alot of not mobile friendy errors and my new posts are not getting indexed because of this. Where i can see console errors?
Hello @miimie
Can you please share those “not mobile-friendly” errors you are getting and where you are seeing those errors?
you can check the console errors by right click anywhere on your website and clicking on inspecting. after that select the Console tab and check for any errors.
You can also check this article for assistance.
Thanks!
Thread Starter
Vegsur
(@miimie)
Mostly im getting “Content wider than screen” & “elements too close together.” I just clear cache and validate fix and they are gone. Errors are randomly coming to between all of my pages. And the site is optimized on mobile perfectly, there are no such problems. I was wondering is this jquery async causing this if google sees the site wrong
Hello @miimie
Thank you for the information.
The problems you are referring to are not related to the jquery loading asynchronously.
This is mostly related to your theme.
You can check articles about “Content wider than screen” & “elements too close together.” for more assistance with this.
Thank you!