NYCPHP Meetup

NYPHP.org

[nycphp-talk] So why is Ajax so fast?

csnyder chsnyder at gmail.com
Fri Jan 12 12:06:52 EST 2007


On 1/12/07, Kenneth Downs <ken at secdat.com> wrote:

> Is this correct?  And if so, why is it so dramatically expensive to
> render a page from scratch, that Ajax could make such a dramatic
> improvement to the situation?

I cannot recommend the Firebug extension for FireFox enough. It has a
"Net" tab that will show you, in detail, how long each subrequest
takes. You think that the browser is caching js and css and all those
images. But unless you have agressive caching turned on, it still
makes an HTTP HEAD request to the server, and waits for the response,
to find out if the cached resource has changed.

Rendering the page doesn't take very long, it's really all about
network traffic, and those milliseconds adding up to real seconds. And
of course, if you're using IE the system has to play click.wav for
each refresh. ;-)

There's also the psychological factor of staring at a blank screen vs.
having a fully rendered page to distract you while the XHR is
performed...

-- 
Chris Snyder
http://chxo.com/



More information about the talk mailing list