Pradip
Pradip

Reputation: 1327

Limit of JQuery's append()

My database contains huge records. I wants to use twitter like pagination with the help of JQuery's append().

Is any limit available for JQuery's append()?

Upvotes: 0

Views: 2102

Answers (2)

Harmen
Harmen

Reputation: 22438

There's a small chance you need to worry about maximum append limits (see Nick's answer). Speed is a larger concern.

I once asked a question about speed of adding elements and eventually tested it myself. See this topic for speed tests. As you can see, .innerHTML is much faster than .append().

Upvotes: 1

Nick Craver
Nick Craver

Reputation: 630429

There's one limit which isn't really of concern here, if the string's over 512 bytes then the dom fragments created by it aren't cached, but it seems you're more concerned with an upper-bound of content in general.

In that case, it's really whatever the limit of .innerHTML in the browser is (pretty damn high), though when appending lots of content you may get some extreme lag in older browsers especially.

Upvotes: 2

Related Questions