출처: https://www.competa.com/blog/speeding-up-rendering-of-large-html-tables/
Although table seems to have become the black sheep of html tags, it is still a very usefull if used what it was intended for: displaying data in a tabular way.
One of the nice features of tables is that one can let the browser handle the width of table cells.
The browser starts rendering the table and when it finds that a cell needs more space, it will re-render the table with an increased width for the specific column.
However when the table contains a lot of data, it might take the browser a lot of time to render the table.
While other browsers do this rendering progressively Internet Explorer does this rendering in memory and thus it could take some time before the user sees anything.
One can speed up the rendering by setting the table’s CSS property ‘table-layout’ to ‘fixed’.
The browser will then take the first row of the table to calulate the widths of its columns. So be sure to specify the width of columns in the first row.
Because no re-rendering has to be done, this will speed up the rendering of the table, and Internet Explorer can also render progressively.
*요약: 테이블의 맨처음 row에있는 모든 컬럼의 가로 사이즈를 지정해줘라.
'밥벌이관련 > HTML&JS' 카테고리의 다른 글
Debounce와 Throttle (0) | 2019.08.13 |
---|---|
FORCE JQUERY LAZYLOAD TO APPEAR (0) | 2019.05.27 |
Strange z-index behavior with scrollbars under Chrome (0) | 2018.04.03 |
onerror 이벤트로 대체 이미지 띄우기 (0) | 2018.03.09 |
TABLE 행 전체선택/해제 및 선택행 값 가져오기 (0) | 2017.10.10 |