加载html表需要一些时间 [英] loading html table takes some time

查看:101
本文介绍了加载html表需要一些时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,



我有一张大桌子,需要花很多时间才能在网上加载。我正在寻找一种解决方案来加快加载时间,我不打算将其拆分成各种页面。有什么建议??以下是链接: http://khi.ac.ir/EnglishW/info/Students/All_Students.aspx [ ^ ]

Dear All,

I have a big table, which takes a lot of time to load on the web. I'm looking for a solution to speed up the loading time, and I'm not looking into splitting it into various pages. Any suggestion?? Here is the link: http://khi.ac.ir/EnglishW/info/Students/All_Students.aspx[^]

推荐答案

嗯,显示这么大的表是不常见的。它不是用户友好的。没有人可以处理它,不仅因为加载/渲染它需要花费太多时间。

您可以使用的是无限滚动类型的方法,如下所示:< a href =http://dumpk.com/2013/06/02/how-to-create-infinite-scroll-with-ajax-on-jquery/> http://dumpk.com/2013/06/ 02 /如何创建 - 无限滚动与ajax-on-jquery / [ ^ ],或使用支持服务器端过滤和分页的jquery网格实现。环顾四周: http://flarnie.com/2013/javascript/best-javascript-grids/ [ ^ ]。但是对于这个你需要某种后端 - 仍然,这是处理大表的方法。
Well, it is uncommon to display such a huge table. It is not user-friendly. Nobody can handle it, and not only because loading / rendered it takes too much time.
What you could use is either an infinite scroll kind of approach, like this: http://dumpk.com/2013/06/02/how-to-create-infinite-scroll-with-ajax-on-jquery/[^], or use a jquery grid implementation that supports server side filtering and pagination. Look around here: http://flarnie.com/2013/javascript/best-javascript-grids/[^]. But for this you would need some sort of backend - still, this is the way to handle large tables.


你可以看看优化你的查询逻辑,以便每次调用页面/返回更少的数据。

这会使你的表加载更快。
You could look at optimizing your query logic to page / return less data per call.
This should make your table load faster.


你也可以将容器对象从表元素切换到div标签。 Div标签的渲染速度比表格元素快。
You can also switch the container object from table elements to div tags. Div tags render faster than table elements.


这篇关于加载html表需要一些时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆