Monday, February 11, 2008

Happy bebe

"Hahahaha! So cool! Dady has a new camera :)" Yes,I finally got a Canon 400D with 17-85mm IS USM, so I finally got to catch Andrei laughing.
Posted by Picasa

Wednesday, January 30, 2008

Super oferta!

If you were wondering what gift you might pick for your Valentine this year, but you're out of ideas, here's a good one for you (not mine, though, all rights reserved):

Thursday, October 18, 2007

Baby Pixel

News, big news!

We have a new member in the Pixel family: Andrei.

He brings sheer joy and sleepless nights in our lifes.

He put a smile in my heart that will never dissapear.

See below Mister Pixel and Baby Pixel:

Quick stats:
  • 4.300 Kilos and 53.5cm at birth
  • actual dimensions :) : 40-40-40
  • age: 3 weeks
  • milk per day (supplement): 6 meals, 600ml
  • interests & hobbies: eat, sleep, cry, smile, poop.
  • Race: JS Wizard Level:1 HP:5/5 SP:0/5 STR:20 DEX:5 INT:5

Tuesday, February 06, 2007

Here's a javaScript fix for the BASE element IE6 bug: the BASE element becomes parent for all following tags if it is not closed with < / base > . As a result: selection problems and unexpected DOM tree (the parent for the BODY tag is the BASE element).

function fixIEBaseTagBug() {
if (is.ie) {
var bases = document.getElementsByTagName('BASE');
if (bases.length) {
 if(bases[0].innerHTML != '') {
  var theHeadNode = document.getElementsByTagName("head")[0];
  var newBase = document.createElement('BASE');
  newBase.href = bases[0].href;
  bases[0].removeNode();
  theHeadNode.insertBefore(newBase, theHeadNode.firstChild);
 }
}
}
};

Cheers

P.S. some details on the BASE tag here on MSDN:

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/base.asp

Friday, September 29, 2006

A note on the BackgroundImageCache command identifier used on IE6 "standalone"

If you are using the multiple IEs in Windows techinque described here, please note that the standalone IE6 does not contain the SP1 so the fix won't work. Thanks to 'Big John' for the tip.

Monday, September 25, 2006

A forensic analysis of the IE6 BackgroundImageCache command identifier

The document.execCommand("BackgroundImageCache", false, true) command seems to do at least what it's name suggests: cache the background images.

Let's see the visible effects of this command.

Step 1: "Is it modified YET?"

IE would "normally" check with your web server for newer versions of the css background images prior to applyng a css rule, no matter what is the value of the cache option. Make it "Every visit to the page.", "Automatically" or "Never", it does not matter, IE wants to know anyway.

Check this with Fiddler. Open the following page in IE: http://www.positioniseverything.net/css-dropdowns.html

See the hordes of requests for a tinny image, all getting the "304 Not Modified" response header. In it's greed to make all these requests, IE actually gets to abort some of them just to make room for others :))

Here's how to fix this insanity: run this bookmarklet inside the IE Addres Bar:

javascript:void(document.execCommand("BackgroundImageCache",false,true))

Look mom, there's no more traffic! Your poor ol' web server can rest now!

Now, let's move on for some more atrocities.

Step 2: "Where's my memory?"

Check the IE Memory Usage: open the above page in a clean instance of IE.

Play with the menu for a while, then check the Internet Explorer Memory Usage in task manager. Continue to move the mouse over the menu while keeping an eye on the "Mem Usage".

On my computer, IE memory heavily bounces between 21MB and 27MB and the menu is slow.

Now apply the patch on the page by running the following bookmarklet inside the IE address bar:

javascript:void(document.execCommand("BackgroundImageCache",false,true))

Guess what! The "Mem Usage" won't shake like this guy anymore and the menu will move much smother. Pages using extensive css background images run a lot smoother with the fix applied.

Step 3: "Move your platans, you lazy, good for nothing hard disk!"

So, it seems IE cache the bg images in memory, with no access to hard disk.

If you take a look at IE using the File Monitor from SysInternals you'll get the picture.

Close all IE instances, open IE, start File Monitor, filter events by process name iexplore, go to the above URL and start moving the mouse over the menus. You'll get something like 360 disk access for just going with the mouse over one menu item. Now apply the patch using the bookmarklet and continue moving the mouse over the menus. You'll see what I mean.

I can't tell at this moment if this fix would cause memory leaks. I don't know yet what's the catch, if there is any.

But it does a pretty good job for me.