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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top