css3 - Using html5 appcache with media queries for pixel ratio -
I have a web app that delivers images of the appropriate resolution for client devices. For example, it will distribute 1x images with a Windows desktop and 2x images retina display in the iPhone.
I'm interested in using my web app to enable offline use. To do this, you need to create a manifest file that lists all the files your app requires. When a user touches the app, the browser gets registered and ready to go offline, all files listed in it are downloaded.
It seems to me that it will reject the issue of my media questions I will put images both 1x and 2x in the manifest, and all clients will end up downloading all the images.
The main solution to the brain is to deliver the dynamically to the manager, use the sniffing of the user agent, to determine whether the manifest contains 1x or 2x images or not. This is practical for me, but I am curious what other solutions are to deal with this issue, or is this just a known boundary / Shankaracharya?
I have a hip that you can choose to select media queries only for each particular device To download the necessary images. The results have shown in the past time that it is reasonable to believe that some images are not required. Seven tests at the bottom of that page are very relevant to your question.
You can create a CSS file with pixel ratio media queries and list it in your manifest file and then check it on the device to see if it actually downloads unnecessary image resources or No.
Comments
Post a Comment