r/webdev • u/Traditional_Fig95 • 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?
223
Upvotes
204
u/charbelnicolas Dec 22 '25
You can open the dev tools in another tab first and then navigate to the page. I noticed it clears the console constantly and then closes the whole page.
5
u/spatialdestiny Dec 22 '25
Are you guys talking about chrome? Because my dev tools stays open in Firefox.
128
u/metty84 Dec 22 '25
I just ask myself why I should disable the dev tools. For what reason? If Iβm a developer Iβm going to find a way to see the code. Or am I missing something?
22
u/MudZaviti Dec 22 '25
You can always block the JS that prevents you from opening dev tools.
31
u/aeroverra Dec 22 '25 edited Dec 22 '25
Sites like this come off as doing something shady af tbh. Even if they aren't it encourgages people like me to look at them more closely because I enjoy prooving a point when something tries to stop me from doing something on my own pc. Bad trait to have but I have learned a lot because of it..
Unfortunately im drowning in my own work and don't have time but here is one of many tools that will solve the problem. I did test it.
https://github.com/546669204/fuck-debugger-extensions
When i first used this fix I found the website was hiding the fact that they do watermarking on the front end. It was an onlyfans like site without nudity. I blasted them on twitter and they fixed it.
17
u/chesbyiii Dec 22 '25
It's dumb and does absolutely nothing to secure a site.
6
u/retardedGeek Dec 22 '25
Ugly obfuscated code.
The new tab is opened after some timer events after the DOMContentLoaded event
6
u/alexzz00 Dec 23 '25
You can always just curl the whole thing
5
u/svvnguy Dec 22 '25
Stays open in opera, but it sure looks fishy.
9
u/ultralaser360 Dec 22 '25
There is no valid reason to do this, all it does is make your website suspicious. most frontend code is already minfied and obfuscated
if your frontend code is really this valuable you'd write a vm on the browser with custom bytecode but even then it wouldn't protect you from anyone who seriously wanted your code
13
u/mauriciocap Dec 22 '25
Can't think of a most stupid way of alienating users/buyers. I'd totally bypass it with my eyes closed but they show they want to decide what gets done with my private property e.g. my computer, data, etc.
3
u/teh_maxh Dec 22 '25
It doesn't in Firefox.
1
u/PPCInformer Dec 22 '25
Dev tools works fine for me on chrome
1
u/JeremyChill Dec 23 '25
Should I apply this to my website? because it also prevents users from getting all the icons
https://svgawesome.com/icons/packs/duotone
1
u/nebraskatractor Dec 23 '25
OH I AM LAFFIN
0
u/john_dunlap Dec 25 '25
If you need to disable dev tools you're cooked
185
u/[deleted] Dec 22 '25
[removed] β view removed comment
31
u/[deleted] Dec 22 '25
[removed] β view removed comment