Google helps me fight Firefox

Every since I started work on GraphViz2 and Graph::Easy::Marpa I was frustrated by Firefox in that it would display an SVG image in isolation by not when I used a 'img' style link to the image, i.e. from within a web page.

But googling eventually led me to a site where the author said he had better results with 'embed'.

So, I switched to embed and it worked. Chrome of course had never had such a problem.

This means I no longer have to produce 2 sets of demos, PNG and SVG, since I can now assume Firefox users will have no problem displaying the images.

If anyone can tell me definitively why this should be the case, I love to know...

The demo pages are at GraphViz2 demo and at Graph::Easy::Marpa demo.

6 Comments

Nifty use of SVG. I like that a lot. :)

And as a sort of bug report: In Opera the images do not seem to reflow the table.

If anyone can tell me definitively why this should be the case, I love to know...
I don't know, but it has been like that since several years ago. Some years ago I abandoned a project using SVG because of the browser problems and switched to PNG. After that I switched to using <canvas> with a fallback to PNG. Using canvas also economizes on the number of bytes compared to PNG or SVG. Another big bonus is that "canvas" is quite easy to program, it has all the drawing elements which are in SVG, like cubic bezier curves.

About your graphs, using your embed method, in Firefox the graph 25 is shrunk up, but in Chrome the same graph is full sized.

Re the shrunk/size issue: I assume you're referring to Murrumbeena overflowing the box boundary in the GraphViz2 demo.
No, it was all shrunk up in Firefox so it appeared much smaller than the other graphs.

Leave a comment

About Ron Savage

user-pic I try to write all code in Perl, but find I end up writing in bash, CSS, HTML, JS, and SQL, and doing database design, just to get anything done...