0

I want to use multiple forms in one page in my project because RightJS have many good methods for AJAX form handling. But I am afraid that it will lead to problems with speed.

Does it really so?

Yi Jiang
  • 49,435
  • 16
  • 136
  • 136
uhbif19
  • 3,139
  • 3
  • 26
  • 48

4 Answers4

3

Having multiple <form> elements can be better for performance, since you're not submitting useless information outside the scope you care about with each submit.

Use as many as appropriate - the units that your information is submitted in, that should be the scope of a particular <form> element, so you're dealing with and submitting only the information you care about with each action.

It's both semantically and performance wise a good move. At the same time, don't go completely overboard and have 100 forms, unless there are actually 100 units of work.

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

Speed will not be affected by having multiple forms on a page.

Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • It would actually be awesome if I could *effect* speed by putting more forms onto a page… `` ;o) – deceze Nov 21 '10 at 13:30
  • @deceze - Now I just need a link from you that will cement the difference in my mind ;) – Oded Nov 21 '10 at 13:33
1

As long as multiple forms don't result in bad usability it's fine - why do you think they'll lead to speed problems (they don't unless you maybe have 1000 forms on your page which you hopefully don't plan to do anyway)?

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
1

Basically, as good people of stackoverflow already told you, in most cases it will be just fine, but I tell you what. The best way to answer a question like "will it be slow or not" is to implement the thing.

Just write a simple loop, generate a bunch of things on the page and see what happens. In many cases there are too many variables and hidden issues to say for sure what will happen. A little bit of an old fashioned experiment will give you more than hours of wondering around :)

Nikolay
  • 1,392
  • 1
  • 9
  • 15