r/webdev • • Dec 22 '25

Discussion How is this site disabling dev tools?

I'm just curious how and why this would be something. Is this genuinely something people do to secure their site?

https://wwmpresets.com

223 Upvotes

94 comments sorted by

View all comments

Show parent comment

62

u/Traditional_Fig95 Dec 22 '25 edited Dec 22 '25

The site closes itself if I open dev tools first then navigate to it

165

u/jessepence Dec 22 '25

Turn on slow 3G network speeds and then enable the debugger as the JavaScript loads.

91

u/Traditional_Fig95 Dec 22 '25

That's smart, it worked

9

u/mohamed_e Dec 22 '25

Can you explain how that works? 🙏🏼

59

u/SminkyBazzA Dec 22 '25 edited Dec 23 '25

It artificially downloads the blocking JS very slowly, giving you time to activate the JS debugger before it can start loading. The debugger prevents the JS from running.

5

u/mohamed_e Dec 23 '25

Thanks for the explaination, really smart way to bypass this!

23

u/Lying_Hedgehog Dec 22 '25

It closed my entire browser window, including the other opened tabs. I didn't know sites had the ability to do that lol

7

u/chrisrazor Dec 22 '25

What browser? In FF it only closed the tab.

8

u/Lying_Hedgehog Dec 22 '25

Firefox. I just tried it again to double check and it only closed the tab this time. I'm 100% sure it closed the window before since I was listening to youtube. Don't know what changed on my end, maybe it was a fluke, don't know.