Maximum number of rows to display in a table on a web page?
When generating a table of data on a web page, I usually give the user the option to page through the data (10, 25, 50, 100 rows per page) or to display it all on one page. This works fine for a few hundred rows, but displaying thousands of rows on one page can take a开发者_如何学运维 long time to generate and transmit to the browser.
Is there a rule of thumb or a best practice for determining the maximum number of rows to display in a table on one page? I.e. when is it best to suppress the option to display all rows and force the user to page?
"When performance suffers" would be my answer, which you need to decide via testing (on the slowest and crappiest browser; IE6).
If the user needs the data as a whole you can always offer it up as a CSV download.
You should really do a full usage analysis on the page in question. Find out what your users really need.
For example:
Do they really need to see all of the records (thousands) on the screen at once or do they just need better filtering tools to get the subset they want.
If they need all the records, do they need it on the page or would a "export" button which creates a CSV file be a better route?
I can't think of an application where it has allowed me to set a page size of more than 100 items per page. Anything beyond that and performance will degrade (if it hasn't already degraded somewhere before 100 records). It depends on what you're displaying, whether there are images to be loaded, etc.
Watch it here, on StackOverflow: when you browse questions, you don't have an option to display all questions. Otherwise you would have to wait for a very looooooong time. Consider not to give the user such an opportunity at all.
Perhaps find out how your users will use your application and design accordingly
Think "findability". Google can show only say the top 10 links on a page because you're very likely to find the right what you're looking for. On the other hand, if you're browsing a site like newegg.com with a limited universe of items that are best grouped by categories - i.e. computer products - the faceted navigation is often a better means of drilling through the options as opposed to search.
In a general sense I find the number of results is best kept at a size that requires no more than two full screen sizes to scroll through (yes I know resolutions differ). From there provide pagination, but with the ability to skip pages, and if possible with a total number of pages.
I would say it depends on the end goal. I know of no "rule of thumb".
I display over 10000 rows in one application on a single page and the user can select the data and move it where they want. Takes less than 15 seconds to display. Most are only seeing 10-100 per page, but some datasets are very large.
You can display a limited number of records (i.e. Select TOP X * from table) and then provide a system for the next X number of rows OR
You can display all records and let the user decide how they want to use the data. One of the ideas already presented would also be to provide a method to download the data and let the user decide on how they would like to use it.
精彩评论