Home Forums Weaver Xtreme Theme Firefox User Agent Switcher and Xtreme 1.0.2.6 Re: Firefox User Agent Switcher and Xtreme 1.0.2.6

#20819
Weaver
Keymaster

It is possible to detect specific mobile devices using PHP’s User Agent sniffing. But there is no real way to detect screen width or basic device type from PHP.

Weaver Xtreme does have some device specific classes added to <body> (e.g., iPad, iPhone, Android), but that is entirely done using JavaScript when the page is loaded into a specific user browser. It is not available to PHP.

So, I guess the answer is there is no way to get phone, smalltablet, or desktop information from PHP in Weaver Xtreme. I think a plugin could be written that could make an approximation, but with so many Android devices in so many screen sizes, the methods used by Weaver II are really kind of obsolete. (Fortunately, Weaver II can operate in pure responsive mode.)