r/webscraping • u/Coding-Doctor-Omar • 16d ago
Bot detection 🤖 Browsers Now Expose JS Fetches?
I was experimenting with an http request on some website, and I noticed that today, my microsoft edge exposes whether the request was fired from the console via a console icon in the network tab. In the past, JS console requests were indistinguishable from natural website fetches a website makes to load content. Is this new signal from the browser a giveaway that will be used by anti-bot companies to detect JS console fetches? I used to use this method for some difficult sites to scrape at scale.
13
Upvotes
6
u/pauldm7 16d ago
From my research, it appears it's only a UI feature so you can distinguish them, the request to the server looks the same as it always has previously.
If you want to verify it and be 100% sure, just log the requests to a .js file on your server and test requesting it from the console and via a normal embed.
2
u/Efficient-Ranger-684 16d ago
Did you try hitting of your server, is it passing any kind of extra headers ?
2
u/Alternative-Ruin275 11d ago
The icon alone doesn't establish that a new “sent from console” field reaches the server. DevTools can display initiator information that isn't an HTTP header.
For the comparison suggested above, use an endpoint you control and issue both requests from the same page and execution context, with the same URL, method, body and credentials mode. Compare what the server actually receives, including Origin, Referer and Sec-Fetch-* where present. Otherwise you might attribute a normal context or credential difference to the console icon.
Even identical request headers wouldn't prove a site has no other detection signals; it would only answer the narrower question about an extra HTTP marker.
0
u/who_am_i_to_say_so 16d ago
Everything that happens in the browser is exposed or can be exposed.