by Pawel Szymczykowski / @makenai
for DHTMLConf 2000
Hi, and thanks for coming to DHTMLConf. First off, I want to do quick audience poll. How many of you want me to say GIF? uh huh. And how many for JIFF? ok. Anyone for other - something else? OK, so ___ it is. I'll try to remember to pronounce it that way. So, my name is Pawel Szymczykowski, @makenai on twitter.+
I'm here repping VegasJS {}, our Las Vegas JavaScript users group. It's a great group, so please drop by if you're ever passing through town. I'm also here on behalf of Zappos.com, where I develop back end API's in Java for our mobile apps. When I get back home I'll be sure to tell them how much I enjoyed Java Fest. I'm here along with Dave Stevens who spoke yesterday on Hapi versioning and Dan Harden who will talk after me. I hobby around a lot on JavaScript and robotics for education, and it's become my go-to language for most things I write for fun.<TD WIDTH="325"> <!-- sites --> <IMG VSPACE="18" SRC="../resources/dot_clear.gif"><BR> <!-- adjust the vertical --> <IMG VSPACE="2" HSPACE="40" SRC="../resources/dot_clear.gif"> <A HREF="/web/20060403150232/http://www.igc.apc.org/womensnet/">WomensNet</A><BR> <IMG VSPACE="8" HSPACE="32" SRC="../resources/dot_clear.gif"> <A HREF="/web/20060403150232/http://www.voiceofwomen.com/">Voice of Women</A><BR> ...The code looked a little like this. It worked pretty well, except for the fact that your code was then littered with a bunch of images you couldn't see. It made it hard to navigate and wreaked havoc on screen readers. It also violated a concept called the 'semantic web' - a term coined by Tim Berners Lee that prioritizes content over presentation to make it easier to use data on the web. An invisible or decorative image has no semantic value.
"If you want machines to read your web pages, use things like definition lists, unordered lists, headers, etc. If you want people to read them, don’t do it. They take away your typographic control. Specify your own font sizes when you want a size change. If you must use bullets, make your own bullets (I don’t see much point in bullets if your vertical grouping is good). And try not to number your list items. It is hardly ever necessary."
— Dave Siegel He had an interesting way of looking at things, and often said things that would make Tim Berners Lee cry. You can't really blame him too much. It was a different era, and he came at the problem from the point of view of a print designer. He was a little bit of a control freak, and didn't try very hard to find a middle ground between style and structure. He might have been one of the first people to try to address web DESIGN instead of just web DEVELOPMENT. He just wanted his web sites to look good and didn't apologize for anything.Now is the time for all good men to come to the aid of their country.
<IMG SRC="images/dot_clear.gif" WIDTH="48" HEIGHT="2">Now is the time for all good men to come to the aid of their country.I'm going to take you a few of the things you could do with single pixel gifs. These are all things that can be done very easily today, but weren't possible then without resorting to trickery. I was a pretty bad web designer back then, and I've done all of these. I even hosted a website called 1x1gif.net for hosting transparent single pixel gifs because I used them so often. I'm still a pretty bad web developer today, but now I use CSS. You could use a long thin GIF to indent the first line of a paragraph. You'd have insert this in front of every paragraph. Now, you can do a text-indent in a CSS file.
I wish you would<IMG SRC="images/dot_black.gif" WIDTH="48" HEIGHT="2" VALIGN="ABSMIDDLE">oh, nevermind.em dashes - vertically center your long gif and make it black, and you have an em-dash. Esthetically nice, but wrong, and huge pain when copying and pasting. There are now html entities pointing to the proper unicode code points with the correct semantic meaning for this.
Who needs<IMG SRC="images/dot_clear.gif" VALIGN="ABSMIDDLE" HEIGHT="60" WIDTH="2"><BR> css line<IMG SRC="images/dot_clear.gif" VALIGN="ABSMIDDLE" HEIGHT="60" WIDTH="2"><BR> spacing?<IMG SRC="images/dot_clear.gif" VALIGN="ABSMIDDLE" HEIGHT="60" WIDTH="2"><BR>If you make your invisible gif tall instead of long, you can control line spacing. At this time, the most you could do was double space, so yearning for this level of control is understandable. It also horrible, because you need to insert at least one gif per line and it makes your code a mess. We have a css line spacing property now.
<IMG HSPACE="13" SRC="../resources/dot_clear.gif"> <IMG WIDTH="8" HEIGHT="8" SRC="../resources/dot_purple.gif"> <IMG HSPACE="13" SRC="../resources/dot_clear.gif"> <IMG WIDTH="8" HEIGHT="8" SRC="../resources/dot_purple.gif">This one just makes me say WHY. There is no good reason to do this. Dave is using a combination of purple and clear gifs to construct an ornate horizontal rule. The amount of space taken by the markup is probably larger than if there was an image. We had the technology for this.
http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever
A few years ago, a developer over at probably programming (the name is not mentioned) did started investigating the smallest possible gif she or he could make. It turns out that these are the component parts of the gif and the one that google sends is a 1x1 pixel with a whte background. I can't be sure, but I like to think that somewhere there did the research and decided it was worth it losing transparency to send 2 bytes less.<TABLE> <TR> <TD><IMG SRC="images/corner.gif"></td> <TD><IMG SRC="images/dot_clear.gif"></TD> </TR> <TR> <TD><img src="images/dot_clear.gif"></TD> <TD>Content Here</TD> </TR>Let's take a look at one more bad hack.. rounded corners. My favorite way of doing this was to create a GIF with a white background and a transparent foreground - and you can stick it into a table and change the background color of the table. It's not literally the worse, but it's not elegant.
end of transmission.
DHTMLConf 2000 continues.