0

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()?

Pradip
  • 1,317
  • 4
  • 21
  • 36
  • I don't really see the relation between paging and `.append()`. Can you elaborate a little more on how do you intend to perform this paging? – Darin Dimitrov Sep 25 '10 at 17:48

2 Answers2

2

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.

Nick Craver
  • 623,446
  • 136
  • 1,297
  • 1,155
1

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().

Community
  • 1
  • 1
Harmen
  • 22,092
  • 4
  • 54
  • 76