468,272 Members | 2,041 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,272 developers. It's quick & easy.

Disable DOM construction


Hi,

We need to generate a huge HTML page (only TABLE/TR/TD structure), for
a size of 5 Mo. The problem is when IE receive this html source, it
try to build a DOM with it. As result, it could be very long to
display the HTML page to the client.

Could we disable the DOM construction in IE?

Thanks!

Jul 23 '05 #1
8 1642


Rick wrote:
Could we disable the DOM construction in IE?


If you disable scripting in IE then it does not build a DOM.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

Thanks but we don't want to disable Javascript for all the pages in our
site, but only for this specific page...

Thx

Martin Honnen wrote:
Rick wrote:
Could we disable the DOM construction in IE?


If you disable scripting in IE then it does not build a DOM.

--

Martin Honnen
http://JavaScript.FAQTs.com/


Jul 23 '05 #3
Martin Honnen wrote:
If you disable scripting in IE then it does not build a DOM.
I find this statement interesting. Is it documented?

If I disable scripting (set Security Level high under Tools/Internet
Options/Security/Local Computer - this is with IE 6 under Win XP Pro,
SP 2) for the local computer and open the following c:\tmp\delme.htm
file then the second text shows black, consistent with your claim:

<html><head><title>DOM test</title></head>
<body>
<div style="color:blue" id="mydiv">Hi mom</div>
<div id="div2"
style="color:expression(document.getElementById('m ydiv').style.color)"Hi dad</div>

</body>
</html>

However, if I introduce delme.vbs as below, then the second text will
be colored blue, too. This doesn't necessarily contradict your claim
because it may be VBScript that is building the DOM, but I am mighty
suspicious because it is IE that is doing the rendering. How say you,
Martin?

set ie=createobject("InternetExplorer.application")
ie.visible = true
ie.navigate2 "c:\tmp\delme.htm"
while ie.readystate<>4: wscript.sleep 10: wend
set div2 = ie.document.getElementById("div2")
div2.style.color = "blue"

Csaba Gabor from Vienna

Jul 23 '05 #4
VK


Rick wrote:
Hi,

We need to generate a huge HTML page (only TABLE/TR/TD structure), for
a size of 5 Mo. The problem is when IE receive this html source, it
try to build a DOM with it. As result, it could be very long to
display the HTML page to the client.

Could we disable the DOM construction in IE?

Thanks!


Specially for such cases (more precisely - for their databound tables)
Microsoft has table-layout style attrubute.

So if you set table style:
table { table-layout: fixed}

IE will display new row as soon as it has data for it. By my
observation (not microtimed though) in this case the display speed is
proportional to the data stream speed.

Jul 23 '05 #5


Csaba Gabor wrote:
Martin Honnen wrote:
If you disable scripting in IE then it does not build a DOM.

I find this statement interesting. Is it documented?


No, I was guessing and should have said so.
And your thinking that while scripting inside the page can be disabled
nevertheless someone might automate IE with script from the outside is
correct and therefore you are right, the DOM is build nevertheless as it
looks.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #6
Martin Honnen wrote:
Csaba Gabor wrote:
Martin Honnen wrote:
If you disable scripting in IE then it does not build a DOM.


I find this statement interesting. Is it documented?


No, I was guessing and should have said so.
And your thinking that while scripting inside the page can be
disabled nevertheless someone might automate IE with script
from the outside is correct and therefore you are right, the
DOM is build nevertheless as it looks.


In principle a web browser must have an internal (software)
representation of the HTML just in order to display/present its
contents. Given modern software design the odds have go to be good that
that representation is a collection of co-operating objects (probably
C++ objects) that represent an object model themselves. The question
would then be the extent to which the object model that interacts with
scripts was something separate from (or parallel to) the object model
that the browser employed itself, or whether scripting just exposed an
interface to that object model. In the latter case the scriptable object
model would always be there regardless of whether it was scripted and in
the former case its creation may not be necessary whenever it could not
be scripted (but there would be no way of knowing/testing).

Given a sufficiently large page, and particularly a sufficiently large
table, I would not expect much improvement in load/display time to be
apparent either way. Working out just the layout for a table is a long
way form being trivial (worse if the browser is attempting progressive
rendering), and there must be some representation of the table in order
to do so.

Richard.
Jul 23 '05 #7
Thanks guys,

But we have already save the HTML page as a HTML file on disk (to
remove streaming delay) and when we re-open it, it take a long time too
(at least 30 secs for 5megs). We have try with a file of 2 and 5 megs
and it's very long even if it take time to display, I'm sure the major
part still the DOM construction. I will try your fixed table as css,
to look if it reduce time to display...

Thx

Jul 26 '05 #8
VK
Rick wrote:
Thanks guys,

But we have already save the HTML page as a HTML file on disk (to
remove streaming delay) and when we re-open it, it take a long time too
(at least 30 secs for 5megs). We have try with a file of 2 and 5 megs
and it's very long even if it take time to display, I'm sure the major
part still the DOM construction. I will try your fixed table as css,
to look if it reduce time to display...

Thx


Thinking over, nothing you can do while working with it as with one
file. I had to work with C# libraries text dumps (over 18,000 entries)
in both IE and Word and it was damn slow on 2Gh/512Mb.

It's just as it is: a 5-10 Mb doc cannot be displayed *immediately*,
unless you get on hold of Cray. Bu it will be problematic to supply a
Cray station to each of your customers ;-)

If we accept the point that no one needs the entire >5Mb *at once* then
there are some variants. Did you hear about tabular data binding? It's
still all on the client side, no server involved.

Jul 27 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Anthony | last post: by
2 posts views Thread by Steve | last post: by
14 posts views Thread by trying_to_learn | last post: by
4 posts views Thread by ChairShot | last post: by
9 posts views Thread by surf_doggie | last post: by
7 posts views Thread by BeautifulMind | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.