发布于 2024-12-08 18:04:35 字数 8 浏览 0 评论 0原文

continue

I have this application that has a form with a drop-down list and a button.

After the form is submitted, another form is loaded in the page using ajax. this happens 5 times.

all forms are the same and contain only a drop-down list and a button.

also each form has attached to it a mysql query that determines what each drop-down will contain.

My question deals with the server requests. I believe that in this application i do 5 server requests, one for each form .

Is it better to create a single page that contain all forms vs the app described above?

i am talking at a load on 80.000 people hitting this application

thanks

edit:

the app works like this:

there is a drop down -> user selects a option and submits ---with ajax---> another form is loaded, a query is made based on previous selection -> user selects a option and submits....etc 5 times

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

走过海棠暮 2024-12-15 18:04:35

Yes - no need to hit the db every time... unless the forms are data driven and the mysql query uses input from the users. I would build the whole form into the JavaScript beforehand.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文