severest / url-throttler

Chrome extension to throttle specific URLs
MIT License
22 stars 7 forks source link

the throttling time doubled when one URL pattern try to throttling 2 requests #1

Open joychester opened 4 years ago

joychester commented 4 years ago

for example the page have 2 different URLs : Request 1: https://host.com/path/to/url/v3?query=abc Request 2: https://host.com/path/to/url/v3?query=bcd

using URL-throttler with match pattern in following: **https://host.com/path/to/url/v3***

The expected result: Both Request 1 and Request 2 will be blocked by 5 seconds

The actual result: The Request 1 will be blocked by 5 seconds, the Request 2 will be blocked by 10 seconds.

severest commented 4 years ago

Yes, I'm able to reproduce this. It seems to be related to the way chrome.webRequest listeners work. Uncertain how to improve this issue at the moment.

A work-around would be to add two separate, more unique URLs (one item for each request) rather than using the wildcard.

severest commented 4 years ago

Actually nvm, that doesn't work either...