[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1721249467936488.jpg (21 KB, 576x432)
21 KB
21 KB JPG
Is there a foolproof way to block any and all phone clients from my website? Preferably server-side but I'll take anything at this point.
>>
bump
>>
File: yo bro, wazz up.webm (800 KB, 320x568)
800 KB
800 KB WEBM
>>101578237
Sure, just parse user agent string or resolution via js or php

Also...

... Fuck you
Sent from my non-iTard phone using Kuroba-Ex
>>
>>101578237
block their user agents

they can get around it but it'd probably be like 0.0000000000001% of phone users
>>
>>101578237
User agent string.
>>
>>101578237
Why do you want to block your clients ?
Could you explain this ?
Any reason to ground your business ?
>>
>>101578237
Are you a pedophile ?
>>
@media only screen and (max-width: 360px){
:root{

display:none;
}
}
>>
>>101578587
Only phone users.
>>
steal some js

https://github.com/Sparganothis/Sparganothis.github.io/blob/master/client/public/js/mobile_check.js

https://github.com/Sparganothis/Sparganothis.github.io/blob/8addc1686040e375354c5d683389097d6f5ddfdb/client/src/app_root.rs#L30

https://github.com/Sparganothis/Sparganothis.github.io/blob/master/client/src/page/you_are_phone.rs#L4
>>
>>101578721
It will load the page anyway, retard
>>
>>101578237
Build a desktop app instead of a website. You can still query an API for the content.
>>
>>101579477
Then somebody will just make a mobile client.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.