Get new jQuery plugins just once a week
September 13, 2012
Foresight-js | A js plugin to serve High Resolution images
Foresight-js is a jquery plugin that gives webpages the ability to tell if the user’s device is capable of viewing high-resolution images (such as the 3rd generation iPad / New MacBook) before the image is requested from the server. Additionally, Foresight.js judges if the user’s device currently has a fast enough network connection for high-resolution images. Depending on device display and network connectivity, foresight.js will request the appropriate image for the webpage.
By customizing the img src attribute using methods such as URI templates, or finding and replacing values within the URI, it is able to form requests built for your image’s resolution variants.
It has the following features :-
- Request hi-res images according to device pixel ratio
- Estimates network connection speed prior to requesting an image
- Allows existing CSS techniques to control an image’s dimensions within the browser
- Implements image-set() CSS to control image resolution variants
- Does not make multiple requests for the same image
- Image dimensions set by percents will scale to the parent element’s available width
- Does not use device detection through user-agents
- Minifies to 7K
Similar plugin : Retina-js
Created by Adam Bradley.
Serve High-Resolution images to iDevices
Sign up for our weekly newsletter.
10 Most Amazing Couple Gifts
A comprehensive guide to couple gift Ideas for Valentine’s Day, Weddings, Anniversaries for your spouse, friend, fiance, boyfriend / girlfriend.
Take me there !
Continue to jquer.in