Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Faster then innerHTML

View parsed - Show only message text

Received: by 10.35.108.12 with SMTP id k12mr2328551pym.1189624577271;
        Wed, 12 Sep 2007 12:16:17 -0700 (PDT)
Return-Path: <jere...@gmail.com>
Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182])
        by mx.google.com with ESMTP id k36si5328294waf.2007.09.12.12.16.16;
        Wed, 12 Sep 2007 12:16:17 -0700 (PDT)
Received-SPF: pass (google.com: domain of jere...@gmail.com designates 64.233.166.182 as permitted sender) client-ip=64.233.166.182;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of jere...@gmail.com designates 64.233.166.182 as permitted sender) smtp.mail=jere...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by py-out-1112.google.com with SMTP id d32so1042468pye
        for <jquery-en@googlegroups.com>; Wed, 12 Sep 2007 12:16:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=beta;
        h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        bh=UkdajOQcjxbg/TVs1J7S4mpXUOLWbESh5YH2wlz9Lh4=;
        b=kBIQnmWwRsokcBXvBm+FEIsravkbnw0rY8LMIGsJiiUWBJrz9qckxtf0vQ/lqrdlCIB641jNxzoRvnsjJdgClF/z/F5Dj+zHxfXCDAfZZdVEWIqSHF8BVBVxJPWcMPQeETOO83rLGQdJTozQ+NDUolDRX+3fEsAsnQkxu9MVGek=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=beta;
        h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=a1Hi/RAMtqv7fFyYwEV2iHGQRACYjwuuSKVxW5U+iQEKvV9+exCqLCBxMfkrPvG35PUM8spvRZc8/87X2UTE3mTA92cLKrPUZxAxhG9tDqGJdgg50iSfCpmawrlt4SbjdI99ALERzHkasIoE5Rwo6RFDc+kSO8DAbl3U/br7H14=
Received: by 10.64.210.3 with SMTP id i3mr15335632qbg.1189624575772;
        Wed, 12 Sep 2007 12:16:15 -0700 (PDT)
Received: by 10.65.110.5 with HTTP; Wed, 12 Sep 2007 12:16:15 -0700 (PDT)
Message-ID: <730bab940709121216s2a3bfcefx99060a8f61308c6c@mail.gmail.com>
Date: Wed, 12 Sep 2007 15:16:15 -0400
From: "John Resig" <jere...@gmail.com>
To: jquery-en@googlegroups.com
Subject: Re: [jQuery] Faster then innerHTML
In-Reply-To: <46E8356B.8050...@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
References: <46E8356B.8050...@gmail.com>

You're in luck! jQuery already pre-empties an element inside .html().
Calling .html() actually does:
  .empty().append("html string");

Although, there's a lot of other issues at play inside .append() in
order to make it work cross browser, so those innerHTML benefits have
probably be nullified in the meantime.

--John

On 9/12/07, Felix Geisend=F6rfer <haimu...@gmail.com> wrote:
>
>  Here is an interesting blog post that I came across:
>
> http://blog.stevenlevithan.com/archives/faster-than-innerhtml
>
>  The synopsis basically is that one can gain dramatic speed improvements =
on
> setting innerHTML when removing items that are going to be overwritten us=
ing
> DOM methods before inserting stuff via innerHTML.
>
>  I could see how this would be a need addition to jQuery.
>
>  -- Felix
> PS: If you like regex make sure to subscribe to this guys blog, he has so=
me
> mad skills going on.
>  --------------------------
>  My Blog: http://www.thinkingphp.org
>  My Business: http://www.fg-webdesign.de

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google