Question

I am making a synchronous ajax call from the product theme to my server in order to create or update that product metafield. The only issue is that it slows the loading of the page.

Is there any better way to update or create a product metafield without necessarily make an ajax call? Thanks

Was it helpful?

Solution

No. You cannot expect an exchange of data to occur without actually exchanging the data itself. There is no such thing as synchronous "asynchronous" Javascript calls either. I think you mean well but you should try and be more precise. What is exactly the problem with speed in this case anyway? Why should you care that a POST back to a server takes 300ms or 600ms or whatever... if it is taking 3000ms you have a screwed up server and this is your issue... not XHR.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top