Closed hjyssg closed 1 year ago
The request is made in the TM's background "tab": go to the addon's page -> click the gear -> Debug Add-ons -> click Inspect Tampermonkey. Passing data between the page tab and TM's needs some time which adds some latency, so it's better to avoid using GM_XHR if possible.
Thank you for the quick answer. According to your experience, what is best practice to do HTTP request in TamperMonkey?
What do you mean?
If you can make a direct request - use fetch
. If CORS blocks it, use GM_XHR.
Thank you very much. I figured out. I thought the browser only allows GM_XHR and prohibits the use of other HTTP libraries.
My Example postData(method, url, data): https://github.com/hjyssg/ShiguReader/blob/dev_frontend_0615/src/TamperMonkeyScript/EhentaiHighighliger_many_request.js
Hi,
I am debugging my HTTP request performance in Chrome, and I have a few questions as follows:
Thank you very much.