Sunday 15 September 2013

Serve different images to different user agents using htaccess

Serve different images to different user agents using htaccess

I am planning to build a responsive website. Though I want the images to
look good on all devices without having to change the content.
Is there a way to serve different images to different user agents or
screen resolutions, using only htaccess?
For example have two folders "/images" and "/imagesiphone" and if user
agent is ihpone it sends images from imagesiphone istead of images (of
course I would have to duplicate all the images in the folder
"imagesiphone").
Would there be any spam reactions if you send different content for the
same requested image?
Note: I dont want to use any javsacript.

No comments:

Post a Comment