Wednesday, January 30, 2008

CSS Performance Enhancing Drugs

Several times I have gone looking for an article like this on Google, and several times I have failed.  Tonight I hit just the right combination of keywords, and up popped this article straight from the horses mouth:

http://developer.mozilla.org/en/docs/Writing_Efficient_CSS

Whenever I'm writing rules for CSS, I always find myself asking questions like "Is it faster for the client rendering engine if I use #id as a selector, or if I use div#id"?  This article answers that and many other questions - and exposes several things I've been doing all wrong, thinking I was actually improving the render speed. 

BTW, from the article:

BAD - tag#id
GOOD - #id"

Monday, January 14, 2008

Windows Media Player Embed

Here is an object / embed I used to successfully embed a .wmv movie in a website.  Users will see the Media Player controls at the bottom, and the movie will "buffer" automatically without the need for some special server software.

<!-- embed:  UCNvideo04.wmv -->
<object id="MediaPlayer1"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows® Media Player components..."
type="application/x-oleobject"
width="640" height="480">

<param name="fileName" value="UCNvideo04.wmv" />
<param name="animationatStart" value="true" />
<param name="transparentatStart" value="true" />
<param name="autoStart" value="true" />
<param name="showControls" value="true" />
<param name="Volume" value="100" >

<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
src="UCNvideo04.wmv"
name="MediaPlayer1"
width="640" height="480"
autostart="1" showcontrols="1" volume="100" />
</object>

We stopped using this though, and switched to FLV files loaded into FlowPlayer (flowplayer.org).

Disqus for A Nofsinger's Blog