google chrome - SVG won't display -


i'm trying simple code work:

<a href="#" target="_blank" style="display: inline-block;">     <object data="icons/chrome.svg" type="image/svg+xml" style="pointer-events: none;">         fallback text     </object> </a> 

when use

data="http://images3.wikia.nocookie.net/__cb20120330024139/logopedia/images/d/d7/google_chrome_logo_2011.svg"  

it works. when save exact file onto own server , reference above, shows fallback text in firefox. in chrome downloads file when open page (which proves file link correct).

anyone know what's going on here?

i can think of 4 possibilities:

  1. your server using wrong mime type svg images. (can fixed adding addtype image/svg+xml svg .htaccess file; other methods discussed here)

  2. you saved svg file somewhere else , doesn't exist @ icons/chrome.svg. (try navigating straight svg file @ icons/chrome.svg. display in browser?)

  3. you saved file insufficient permissions, resulting in web server being unable access file. (can fixed navigating icons directory , typing chmod 0644 chrome.svg @ command line prompt.)

  4. the file downloaded nocookie.net isn't svg file @ all. (try opening inside text editor.)


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -