I’m writing a responsive wordpress theme.
I’d like to serve different image files (smaller) to mobile phone visitors, in order to save bandwidth.
Is it possible to do something like this?
As of now, mobile visitors see css-resized images.
thank you!
It is possible.
For example in PHP you have $_SERVER[‘HTTP_USER_AGENT’]
http://php.net/manual/en/reserved.variables.server.php
thanks to this you can identify browser and system on witch it is running.
Example value is: Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)
As you can see thanks to this you can do some guessing, like filtering IOS and Android
or maybe ARM architecture.
Regards,
Grzesiek