Mar
27
2010

I’ll be heading down to Atlanta, Georgia to attend LessConf3010 on May 21/22, 2010. They can say it better than I can:
LessConf is a conference with talks ranging from startups to design to marketing to business. It’s a casual two-day event in Atlanta Georgia with awesome speakers here to inspire you. Each speaker will have a 45 minute talk followed by a 15 minute Q/A session with Steven Bristol.
It’s put on by Allan and Steve of LessEverything. It’s $402 and includes a T-Shirt, copy of REWORK, and lunch with the speakers if you are within the first 100 to sign up (still room).
I’m pretty stoked about it. I don’t get a chance to go to many conferences, but the two I’ve been to I had a great time at. I’m looking forward to the variety at this one. Some design stuff, but also startup stuff, marketing stuff, and general business stuff.
Speaker Lineup
I probably don’t have the answers to any super specific questions about it, so I’m going to turn off comments here and have you direct your questions/comments toward the conference folks themselves.
no comments | posted in web design
Mar
27
2010
Did you know that you don’t have to link to an external image file when using an <img> element in HTML, or declaring a background-image in CSS? You can embed the image data directly into the document with data URIs.
With CSS, it looks like this:
li {
background:
url(data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7)
no-repeat
left center;
padding: 5px 0 5px 25px;
}
With HTML, it looks like this:
<img width="16" height="16" alt="star" src="data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7" />
The format, to be specific:
data:[<mime type>][;charset=<charset>][;base64],<encoded data>
Basically, a super long string of gibberish characters. It’s not gibberish to the browser though of course. This data is interpreted as the type of file you are saying it is.
You can see a really dumb demo page here. I’ll be covering the important parts next.
Why would you do this?
The biggest reason: it saves HTTP Requests. Other than pure document size, this is the #1 factor concerning how fast a page loads. Less = better.
How do you get the code?
Use this online conversion tool. It’s the nicest one I have found.
Browser Compatibility
Data URI’s don’t work in IE 5-7, but are supported in IE 8. You could:
- Use an IE-only stylesheet to put images in, or,
- Use it only for progressive enhancement type stuff where having no image is perfectly acceptable, or,
- Not care
- Read this article about an alternate technique that does work.
Important Notes
- Size of embedded code is somewhat larger than size of resource by itself. GZip compression will help.
- IE8 has the lowest maximum data URI size of 32768 Bytes. (HEY?!?! There is that crazy number again.)
- It’s hard to maintain site with embedded data URIs for everything. It’s easier to just update an image and replace it.
- If you are using PHP (or PHP as CSS), you could create data URIs on the fly like this <?php echo base64_encode(file_get_contents("../images/folder16.gif")) ?>
- You should only use this in documents that are heavily cached, like your CSS should be. Having a CSS file that is 300k instead of 50k is fine if it saves 6 HTTP requests, but only if that CSS file is cached just as well as those images would be. Setting long expires on CSS files should help.
- Data URIs are not limited to images, they could literally be anything.
- <canvas> may obsolete the coolness of all this, when it gets more supported and people build cool tools for it.
no comments | posted in web design
Mar
27
2010
By Pelshuai KorPoker has been enjoyed around the globe over two hundred generations currently but online poker has just scarcely touched the ground. Online poker has just begun to create its mark on the planet and it is taking the overall game to a higher degree. Online poker was primary established in the industry in the year 1998. Planet poker is the first online poker site on the internet.
no comments | posted in SEO
Mar
27
2010
no comments | posted in Technology
Mar
27
2010
no comments | posted in Technology