time to render table

O

oldyork90

Is there a way I can time browser drawing/rendering time for a given
element. I have a huge table. I have it's name. We'd like to
experiment with different combinations to speed things along. Can we
capture the time somehow?

Thanks
 
T

Thomas 'PointedEars' Lahn

oldyork90 said:
Is there a way I can time browser drawing/rendering time for a given
element. I have a huge table. I have it's name.

`table' elements cannot have a name as the `table' element type does not
have a `name' attribute. They can have an ID as the element type has an
`id' attribute. Anything else is invalid markup, see http://validator.w3.org/
We'd like to experiment with different combinations to speed things
along.

Make your table much shorter.
Can we capture the time somehow?

Yes, you can.

<script type="text/javascript">
var start = new Date();
</script>

<!-- markup -->

<script type="text/javascript">
document.write("<p>Rendering of the markup before took about "
+ (new Date() - start) + "&nbsp;ms.<\/p>");
</script>

should suffice. You may also use window.alert() instead of document.write().


PointedEars
 
O

oldyork90

`table' elements cannot have a name as the `table' element type does not
have a `name' attribute. They can have an ID as the element type has an
`id' attribute. Anything else is invalid markup, seehttp://validator.w3.org/


Make your table much shorter.


Yes, you can.

<script type="text/javascript">
var start = new Date();
</script>

<!-- markup -->

<script type="text/javascript">
document.write("<p>Rendering of the markup before took about "
+ (new Date() - start) + "&nbsp;ms.<\/p>");
</script>

should suffice. You may also use window.alert() instead of document.write().

PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

Thank you pointed ears!
oy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top