I have a few perl CGIs which almost query the whole table with more than 5000 rows
as result and send that data to browsers. The size of html data generated is around 1MB
.
Earlier I was using tables(which should be ideal approach).
Unfortunately most users use IE and it does not display data till it receives closing table tag. Can we do something about it.
To push output as soon as its generated, I used another approach where in I was using printf and <pre>
. Which reduced the response size by 200kb and and it appears more faster in display.
Again IE (not any other browser) eats up CPU and hangs for couple of seconds... :-( ..
Can we do something about it too.
FYI I am using IE8.
Perhaps it would be wise from a UX perspective to use some sort of pagination method. Having a single page with thousands upon thousands of rows sounds entirely unfriendly for the end user. Something like a simple means of pagination ("Skip to page =dropdown=") would certainly solve your problem, as well as decrease load times and increase usability.
There are also several solutions which are pre-built and would likely integrate rather easily. One which comes to mind almost immediately is Sencha's Paging Grid:
- http://dev.sencha.com/deploy/dev/examples/grid/paging.html
- http://www.sencha.com/products/js/
It's pretty nifty and you'll likely get some kudos for using a hip new technology. There are other options, too:
- Ingrid: http://www.reconstrukt.com/ingrid/src/example3.html
- YUI Data Grid: http://developer.yahoo.com/yui/datatable/#data
- MyTableGrid: http://pabloaravena.info/mytablegrid/
Hope this helps!
More people use ie? http://www.w3schools.com/browsers/browsers_stats.asp
anyways why do you still use tables? we all know they are easy to maintain, easy to get confused and in your case slow...
output it as div which will show all the data and does not need to wait for a table tag to finish. as div and span have the least properties.
精彩评论