<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <generator>Persumi - Level up your writing and blogging with AI</generator>
  <category label="Blog" scheme="http://persumi.com/u/fredwu/tech/e/blog" term="blog"/>
  <category label="Tech" scheme="http://persumi.com/u/fredwu/tech" term="tech"/>
  <link href="http://persumi.com/u/fredwu/tech/e/blog/t/sprites"/>
  <link href="http://persumi.com/u/fredwu/tech/e/blog/t/sprites/feed/rss"/>
  <link rel="self" href="http://persumi.com/u/fredwu/tech/e/blog/t/sprites/feed/atom"/>
  <author>
    <name>Fred Wu</name>
    <email>ifredwu@gmail.com</email>
    <uri>http://persumi.com/u/fredwu</uri>
  </author>
  <subtitle/>
  <id>http://persumi.com/u/fredwu/tech/e/blog/t/sprites</id>
  <title>Blog (sprites) - Fred Wu&apos;s Tech</title>
  <updated>2026-04-17T12:10:04.897012Z</updated>
  <entry>
    <content type="html">&lt;![CDATA[&lt;p&gt;
When making the new design of this blog, I inevitably come to the dilemma of whether to use &lt;a href=&quot;http://css-tricks.com/css-sprites/&quot;&gt;traditional CSS sprites&lt;/a&gt; (i.e. to use background image positions to locate the images) or to use &lt;a href=&quot;http://en.wikipedia.org/wiki/Data_URI_scheme&quot;&gt;Data URI sprites&lt;/a&gt; (i.e. to use Data URI / &lt;a href=&quot;http://en.wikipedia.org/wiki/MHTML&quot;&gt;MHTML&lt;/a&gt; to replace the actual image files).&lt;/p&gt;
&lt;p&gt;
First of all, during the design and development stage, everything was built without any sprites in mind. It is just so much easier to build the template without worrying about background image positions.&lt;/p&gt;
&lt;p&gt;
After the template is finalised, I then used the sprite tools to generate the sprites.&lt;/p&gt;
&lt;p&gt;
Data URI, on paper sounds like a very good approach, especially when &lt;a href=&quot;http://duris.ru/&quot;&gt;duris.ru&lt;/a&gt; takes care of everything, including &lt;a href=&quot;http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/&quot;&gt;the support for IE7&lt;/a&gt; and optimising the images using &lt;a href=&quot;http://developer.yahoo.com/yslow/smushit/&quot;&gt;Smush.it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
Unfortunately, the limitation of Data URI and MHTML, namely, the 32KB length limit in IE 8, makes this approach less feasible.&lt;/p&gt;
&lt;p&gt;
In the end, I generated the CSS sprites using the &lt;a href=&quot;http://spritegen.website-performance.org/&quot;&gt;CSS Sprite Generator&lt;/a&gt; and manually replaced those CSS attributes.&lt;/p&gt;
]]&gt;</content>
    <published>2010-03-03T04:42:00.000000Z</published>
    <category label="Blog" scheme="http://persumi.com/u/fredwu/tech/e/blog" term="blog"/>
    <category label="Tech" scheme="http://persumi.com/u/fredwu/tech" term="tech"/>
    <link href="http://persumi.com/u/fredwu/tech/e/blog/p/css-sprites-or-data-uri-sprites"/>
    <author>
      <name>Fred Wu</name>
      <email>ifredwu@gmail.com</email>
      <uri>http://persumi.com/u/fredwu</uri>
    </author>
    <id>http://persumi.com/u/fredwu/tech/e/blog/p/css-sprites-or-data-uri-sprites</id>
    <title>CSS Sprites or Data URI Sprites?</title>
    <updated>2010-03-03T04:42:00.000000Z</updated>
  </entry>
</feed>