This isn't Inkscape related, but I thought it was worth promoting a website that makes good use of the SVG standard.
LastGraph will graph the listening habits of Last.fm users and provide it in either PDF or SVGZ format. Here's a graph of my listening habits for a period last year where I listened to a lot of random music - you're going to have to zoom (note that graph will expire in a few days).
LastGraph - Generate an SVG Graph of your listening habits
Re: LastGraph - Generate an SVG Graph of your listening habits
The SVGZ lacks a "Content-Encoding: gzip" header. So, right now it can be only viewed directly with Opera (because it does non-standard encode-probing).
Re: LastGraph - Generate an SVG Graph of your listening habits
aho wrote:So, right now it can be only viewed directly with Opera
Do you mean as opposed to viewing it in FireFox? I am using Opera, so as you suggest, I didn't see any problem. But I was also able to open it in Inkscape.
Re: LastGraph - Generate an SVG Graph of your listening habits
Firefox displays an XML error, because it tries to read the gzipped stream directly... and that obviously isn't well-formed XML.
It works with Opera, because Opera always checks the encoding on its own. That is... it always tries to gunzip it - even if no encoding header is set.
This behavior is intentional and off-spec. It's sorta nice, because it improves compatibility. But it's also bad, because webmasters may not notice this under the hood error correction. It's a two-edged sword, really. Generally it's a bad thing, because it leads to sites/web apps, which rely on incorrect behavior. Additionally all those "nice" helper routines add up for all eternity. Once you support something off-spec, you'll need to support it till the end of days.
Using the correct header is pretty easy:
.htaccess
Code: Select all
XML Parsing Error: not well-formed
Location: http://lastgraph.s3.amazonaws.com/graph_6129.svgz
Line Number 1, Column 1:
��KJG
^
It works with Opera, because Opera always checks the encoding on its own. That is... it always tries to gunzip it - even if no encoding header is set.
This behavior is intentional and off-spec. It's sorta nice, because it improves compatibility. But it's also bad, because webmasters may not notice this under the hood error correction. It's a two-edged sword, really. Generally it's a bad thing, because it leads to sites/web apps, which rely on incorrect behavior. Additionally all those "nice" helper routines add up for all eternity. Once you support something off-spec, you'll need to support it till the end of days.
Using the correct header is pretty easy:
.htaccess
Code: Select all
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
Re: LastGraph - Generate an SVG Graph of your listening habits
I've sent an e-mail to the author to let him know.