1222North.com

Posts Tagged ‘javascript’

July 6th, 2009

One of my favorite panels at SXSWi

Author: Chris

I know it’s bit late but I wanted to mention my favorite panels at SXSWi that attend this past spring.

“Even Faster Websites” presented by Steve Souders which he is well know for creating YSlow and now Google Page Speed. If you’re not familiar with these two Firefox plugins then you should definitely check them out.

What I really enjoyed about his presentation was how technical it was, which most panels I went to were mostly theories and best practices. What he focused on that day was javascript which has become more and more heavily used with today’s websites and definitely with things we have done here. Here are few key things he touched on.

Script blocking which is when a browser downloads JS (javscript) and that JS filet will stop everything from loading, images, css files and iframes. The browser will then also wait till the JS is executed and then finish downloading the other assets.

IE7 only allows 2 connections per hostname. What this means in a nut shell is the browser will only download 2 files at the same time from the same domain name. People get around this by what they call domain sharding, where you have multiple sub domains loading assets for one site. For instance Amazon.com has a.amazon.com, i.amazon.com and so on. With this technique though you still have to wait for JS to load and execute before the browser can continue downloading the other assets.

A couple other things Steve mentioned were iframes share the same connection pool with the parent window. Meaning if the iframe is loading 2 things already then the parent element can’t load it’s assets. Also stylesheets in the parent parent window also block iframes and/or it’s resources.

Now Steve did mentioned a few good ways to address these issues. Put your JS at the end of your web page, just right before the closing body tag. Use the script DOM element or script onload technique to load your JS. I’m not going to explain the process of implementing these 2 techniques because they get pretty technical but you should look at his reasoning in the powerpoint.

Last but not least are few other things to help speed up your site. Gzip your files, sprite your images and flush your document. Now I’m off to make the web even faster!

October 19th, 2007

Call Thickbox from Flash

Author: Mike

When adding this little function to your thickbox.js, you can use it to call thickbox from flash.

Things to keep in mind are to make sure, as with most flash files, is to make sure you wmode is set to transparent. I also found that the function on this page does not allow for a caption to be passed. However a simple workaround for this is to pass another parameter through the function and add that variable name to the caption conditional.

Thickbox with your Flash

January 29th, 2007

“Click to activate and use this control” — Another I.E. Bug

Author: Mike

Yet another bug from the world’s most obnoxious browser. This is old news apparently, but since I don’t use I.E. on a PC very often and because I never thought I would have to test Flash on different browsers, I never noticed it.

Anyway, on the newer versions of I.E., when you mouse over a flash object it displays “Click to activate and use this control”. This basically means that all user interaction with the flash file is disabled until they click on it. Not the end of the world, but very annoying. Apparently this is because Microsoft lost a legal battle with a patent holder about the way Internet Explorer displays OBJECTs and EMBEDs in webpages.

I noticed a while ago that people had started to embed their swf’s with Java Script instead of using the Object tag. I never really understood why until now. I found a few ways to fix this little problem, both using JavaScript.

The Swf Object
Mix-fx

November 28th, 2006

Yahoo! Developer Network

Author: Mike

Not sure if any of you have checked this out yet or not, but it’s a handy little resource. Complete with tutorials and reference material on all sorts of JavaScript, Flash, PHP, such as loading Flickr images into flash, Creating maps from Yahoo! Maps to name a few. Anyway, added it to our General Resource Category under links.

Yahoo! Developer Network

November 23rd, 2006

Accordion Div Dummy by MooFX

Author: Mike

So I downloaded the Java Script from a previous post I wrote about MooFX. I created a dummy and placed the source files in The Web Cave under Scripts/moofx/.

View Dummy