Kyle Adams

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromKyle Adams
ToMe
SubjectSafari 3 Load Bug
Date6 November 2009 19:25
Hi,

Awhile back you wrote an article on benchmarking Safari that included
details of a bug wherein Safari would fire the window.load event too early:

http://www.howtocreate.co.uk/safaribenchmarks.html

Do you know when/if this bug was ever fixed?  We tried reproducing it
recently as we wanted to make sure that the onload fired properly in Safari
4.  Unfortunately we were unable to replicate the behavior in Safari 3.2.3
for Windows (the version that proved easiest to setup).

Thanks,
Kyle
FromMe
ToKyle Adams
SubjectRe: Safari 3 Load Bug
Date13 November 2009 21:28
Kyle,

> Do you know when/if this bug was ever fixed?

I have not followed it since then - I will leave Webkit to fix their bugs.
It was definitely present in version 3.0, and one of the lead developers of
Safari insisted that it was beneficial and intentional behaviour. It is
unlikely they would fix it after that - I cannot imagine that my article
would get them such bad press that they would finally decide to change
something they have insisted is intentional.

> Unfortunately we were unable to replicate the behavior in Safari 3.2.3
> for Windows (the version that proved easiest to setup).

Then chances are you did something wrong. I was able to reproduce it with
basic HTML content, regular images, CSS files, or CSS backgrounds. In all
cases, it would fire onload too early, typically before anything appeared
(though anything you might do to show when that happened, such as displaying
an alert, would then cause it to render in the background, so you might not
see the bug with your eyes - you have to do something that should definitely
cause a flicker and see if it happens). In the case of large and slow
images, it could be seen to fire onload before the images had decoded
completely. Big interlaced images are good for that, but it's unpredictable.

Unless you are building a benchmarking suite, you probably don't need to
care. If you are doing building such a suite, don't rely on onload, use
something more reliable (good luck with that).


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.