View Single Post
  #1  
Old 08-11-2004, 05:16 PM
 
Adian009 Adian009 is offline
 

Advanced Member
  
Join Date: Mar 2004
Location: Tiverton, RI, USA
Posts: 37
 

Default HTML Table MOD - *HUGE* Performance Incr for Clients!

I got this tip from one of the HTML gurus at work and it has an amazing impact on client side performance - I mean, the difference is completely noticable, I would say 200% increase in page rendering.

The more tables you do this to in X-Cart, the better it will perform because it uses so many nested tables. Remember though, the performance increase is solely client-side, there are no server-side performance implications here...

Here is a Microsoft web page example of the effects of this. After the test page loads hit refresh a couple of times to watch the dramatic effects.

You can do this to any table where you can define the column widths! I did it in my home.tpl, product.tpl and products.tpl.

In the <table> tag you add:

style="table-layout:fixed;"

Just below the <table> tag but before any <tr> tags you add:

If you use pixles: <col width="##px">
If you use percent: <col width="##%">

Add a <col> tag for each column in the table.

There is more you can do, too but this in itself is a dramatic increase in client side performance! (You can add "width=###" to the COL tags for more performance.)

The reason this increases performance in the browser is because the browser doesn't wait for the table/cell contents before rendering the table - it renders the table immediately based on the <COL> tags instead.

I hope this helps out everyone!

--al ponte
__________________
---------------------------------------------
Infosolv, LLC
A Professional Services Company
X-Cart v3.5.10 & 4.01
Find our MOD\'s at: Custom X-Cart MOD\'s, Add-On\'s & X-Cart Hosting!
Reply With Quote