May 25, 2006

site optimization - inkl tabell vs css

ein del anna interessant der også - noko visste eg og anna hadde eg ikkje tenkt så mykje på...

Site Optimization Tutorial
".... table-based layouts are the de facto Web standard, and foremost because table-heavy designs have a nasty reputation for poor performance.

And CSS layout? It's faster, better, and smarter.
....
Even though pure CSS positioning is the ideal way to lay out a page, it can make your site look funny (if not ugly) for Internet Explorer 4 and Netscape 4.x users. That's still a fair enough shake of the Web audience. And while you can design CSS that degrades nicely in older browsers, it still tends to look, well, degraded. If what you want is the most cross-browser, cross-platform, business-friendly design solution, you still have to lay things out on the table.
...
CSS is cooler. And smaller. And in the long run, its better.
....
[But] Let's face it, sometimes right-now compatability trumps future-compatability.
....
Unfortunately, tables also increase the time it takes to display a Web page, and some times by a substantial amount.
....
[next page]
As tables get bigger, and nested into one another, the amount of info that needs processing increases exponentially.
....
Basically, you still need to do whatever you can to optimize table code. Or, better yet, avoid it altogether.
....
Accelerating fixed-width tables .... a CSS-1 style of {table layout: fixed} to a fixed-width table speeds up the display process in Netscape 6+ and IE5+.
....
[code example: ] table style="table-layout: fixed;" width="600"
....
Now, don't go abusing the browser's trust! If you apply the {table layout:fixed} style incorrectly, with WIDTHS that don't quite add up, the browser will catch the error during the rendering process and start things over from scratch.
....
[next page]
One old-school trick works, though — remembering that lots of little tables appear to render faster than one big, many-rowed table.
....
HTML editors ... produce amazingly inefficient code.
....
One notorious culprit associated with slow-to-the-screen Web pages has always been the nested table.
....
browsers have to work doubletime on tables. Unlike most page elements, tables absolutely require two passes of browser "reflow" (layout code-crunching)
....
A single-nested table requires two passes, plus one more, because the inner table must be partially re-rendered during outer table's rendering process. Nest three tables inside one another, and that makes for five passes of reflow. Nest five levels deep, and the browser loops through reflow routines nine times.
....
So avoid using nested tables whenever possible, even if it means making minor alterations or simplifications to page layout.
....
Even though table rendering speed issues are less problematic on modern PC hardware, table layouts still hamper screen readers and other accessibility-enhanced browsers. Nested tables doubly so. We're building Web pages here, not those little Russian dolls."

No comments: