Johan Rylander

2010-07-02

innerHTML vs jquery html()

Postat i: web — Johan Rylander @ 10:02

Just learnt from hard experience the performance difference between the vanilla javascript innerHTML property and jquery’s html() method.

For Firefox 3.6 it was not so bug, just maybe 50% but for Safari the difference was several 100% (!). For Google Chrome, the difference was somewhere in between. All this is for a pretty large chunk of html and has been tested on Mac OS X. In usability the difference meant not being show a spinning beach ball in Safari and for Chrome not being asked whether it should terminate the script.

Kommentera »

Inga kommentarer ännu.

RSS-flöde för kommentarer till det här inlägget. TrackBack URI

Lämna en kommentar

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter-bild

You are commenting using your Twitter account. Logga ut / Ändra )

Facebook-foto

You are commenting using your Facebook account. Logga ut / Ändra )

Ansluter till %s

Tema: Silver is the New Black. Blogga med WordPress.com.

Follow

Get every new post delivered to your Inbox.