Page 1 of 1

SVG objects vs div layers

Posted: Mon Jun 06, 2011 2:53 pm
by Isaac

Re: SVG objects vs div layers

Posted: Mon Jun 06, 2011 6:41 pm
by Isaac
Image

Re: SVG objects vs div layers

Posted: Mon Jun 06, 2011 10:26 pm
by Jeff250
Right, I do know that IE9 is the first IE to support svg without plugins, which is a pretty bad situation for Web developers. The rest of browsers have supported it for a while.

While svg's are cool, before you alienate most IE users, think about why you would want to use svg's, e.g., what benefit would they have on your Web site versus converting them to png's. For instance, vector graphics have infinite resolution, but is that really important for an image on a Web page? Also, keep in mind that not everyone uses IE by choice, e.g., a lot of people are forced to use it at work where they don't have permission to install a better browser.

Where I see svg's mostly used on the Web is for plots and diagrams, i.e., optional features where people who can't see svg's are just missing a small feature in your Web site.

One idea you might want to try is to use the <object> tag for the svg and then put an <img> tag inside of it for fallback. I don't know how well this works in practice, although it should work in theory... I've never actually had a good reason to use svg's yet.

Re: SVG objects vs div layers

Posted: Mon Jun 06, 2011 10:34 pm
by Sirius
It depends.

If you're doing it for yourself, you decide what your priorities are. If you want to use SVG, that's up to you, and not too horrible.

If you're doing it for customers, the aim of the game is to make things simpler for them, not you. People can and do turn away from sites if it requires extra effort from them to look at, even if they have the ability to modify/update their browser. Luckily, this rarely means you need to support IE6 any more, and 7 is even less popular, but 8 is still in the mix.

Re: SVG objects vs div layers

Posted: Mon Jun 06, 2011 10:53 pm
by Jeff250
Especially since XP users can't upgrade to IE9.

My personal policy is to only support browsers that still receive security updates. If $BROWSER_VENDOR doesn't support their browser, then why should I? Sadly, this means that IE6 won't truly die until 2014 when XP reaches end of life. But support means that the meat of the site works, but maybe not all of the gravy. Say, if your site has an eclectic feature where it can dynamically generate some cool svg plots of some data that only a few people would want to look at anyways, then that's a good excuse to not support an older browser. No reason to exclude people from a cool but optional feature just to appeal to the lowest common denominator.

Re: SVG objects vs div layers

Posted: Tue Jun 07, 2011 6:04 am
by Isaac
Sirius and Jeff, thank you!


Google Analytics shows IE users rarely went to my site, in comparison to other browsers, in the last two years, even when it was designed primarily for them, though it was highest at the start of 2009.


Since I'm still very new to web code, I'll only worry about IE9, Chrome, and FF, while I learn. Older, more complicated, browsers will be a lower priority.

Thanks again.

edit:
I could add,

"Sorry, your browser requires very special and very specific coding to function, not shared by other browsers. This site is made for browsers that are allow more commonly used code, like the latest builds of Chrome, Opera, Safari, Firefox, and Internet Explorer. I might later make a special version of my site just for your special browser, but I don't know when."



edit:

of course, if I ever make a site for someone else, Jeff, I will have to use your advice and method of decision making, regarding compatibility.