Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
So recently i ran in to a problem where by some reason my website is working so slow doe to this error. Can anybody help me fix this, it is ruining the site speed so bad. my error on google site speed test:
Deprecation / WarningSource
masterysneakers.com 1st Party | |
Synchronous `XMLHttpRequest` on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. |
Hello Tomeliss,
This warning from browser telling you that using synchronous XMLHttpRequest on the main thread is deprecated because it can have negative effects on the user experience.
Synchronous XMLHttpRequest halts the execution of the JavaScript code until the request is complete. This could lead to a frozen user interface and a poor user experience, especially if the requested resource is slow to respond or unavailable. That's why it's recommended to use asynchronous XMLHttpRequest instead.
Here's how you can make an asynchronous XMLHttpRequest:
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://api.example.com/data", true); // true makes it asynchronous
If you find my suggestion difficult to implement send an email at rajvee.kadchha@mlveda.com
Could you instruct me where should i implement this piece of code?
In your code, you will be able to find this section. Please refer to the screenshot, you just have to add the highlighted code.
May i know in which file is it?
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025