html - Data Protocol URl -


what reliable way use data uris images? know ie6/7 don't support them, work?

  1. i use data uris images default
  2. if browser ie6/7 shows image (not data actual image) using javascript
  3. include image (not data) in <noscript>.

my question is: image fetched in <noscript> if browser supports javascript , data uris?

if want go down road (and not bother), could it...

// parse user agent , figure out if browser supports data  // uris - e.g. `supportdatauri()`.  also, store image path // somewhere - i'll assume convenience attribute called `data-image-src`  if ( ! supportdatauri()) {     var images = document.getelementsbytagname('img');     (var = 0, imageslength = images.length; < imageslength; i++) {        var imgsrc = images[i].getattribute('data-image-src');        images[i].src = imgsrc;    }  } 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -