JS - mobile and url

I’d even say that unless you are doing this for gathering some kind of rough statistical data the pursuit is pointless.

That is, if you are thinking of this as a way of “device sniffing” to serve different mark-up or style or script etc. based on device, you’re approaching this the wrong way. Trying to keep up with all devices would be almost as difficult as counting the grains of sand on a beach.