RSS icon in CSS & HTML
Found something sick from JWZ on LiveJournal - a CSS-based RSS icon. Believe it or not, it's smaller in bytes than the gif.
shortname=ooocaa
Found something sick from JWZ on LiveJournal - a CSS-based RSS icon. Believe it or not, it's smaller in bytes than the gif.
shortname=ooocaa
Archived Comments
In the case of the CSS version, at the very least, the contents of the A element, with everything in it must be downloaded each time it's needed.
of course, you're going to have to download an A element and the IMG element if you're using a GIF, and thus those are equal - and if you link to the stylesheet externally, that would be properly cached, just as the GIF would be.
However, it is STILL more bytes for the CSS version, because you must include the stylesheet via the link element, and there is nothing analagous to that when using the GIF version.
So, in conclustion of my rambling, the CSS vesion is still bigger, albeit a nice alternative.
Image is 505 bytes (429 image plus 76 for each link: <a href="/rss.xml"><img src="/xml.gif" height="36" width="14" alt="XML"></a>). CSS is 360 bytes (260 CSS file, 56 to include it: <style type="text/css">@import "/orangeXml.css";</style>, and 44 for each link: <a class="orangeXml" href="/rss.xml">XML</a>)
Conclusion: I just wasted time counting for a difference of 145 bytes. But if you have a page like this, you might go with CSS because it repeats less for each link.
It says "XML" because the originator of the image also uses it for another XML format, OPML.