473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Document trailers : can anything legitimately follow </HTML>

Configuring a new instance of IIS, I noticed that it
allows an HTML-formatted document trailer to be appended
to every document served. Unfortunately, on checking
its behaviour, I find that it appends the trailer
/after/ the closing </HTML> of the document, separated
by a blank line. I therefore have a few questions :

1) Assuming HTML 4.01 Transitional, can anything
legitimately follow the closing </HTML> tag ?

2) If so, can this be a container with text that
a browser would be expected or required
to display ?

or

Can this be a comment which a browser is not
required or expected to display, but which
could be read if a visitor went into source
view ?

3) Is it possible to generalise the answers to the
above so that no matter which DTD is used,
the material following the closing </HTML>
tag is still legal and capable of being
read in some way (when I say "no matter which
DTD", I restrict myself to those currently
promulgated by the W3C, i.e., the HTML 4.01
family (frameset, strict and transitional),
and the XHTML family).

Philip Taylor, RHBNC
Jul 20 '05 #1
9 1985
Philip TAYLOR <P.******@Rhul.Ac.Uk> writes:
Configuring a new instance of IIS, I noticed that it
allows an HTML-formatted document trailer to be appended
to every document served. Unfortunately, on checking
its behaviour, I find that it appends the trailer
/after/ the closing </HTML> of the document, separated
by a blank line. I therefore have a few questions :

1) Assuming HTML 4.01 Transitional, can anything
legitimately follow the closing </HTML> tag ?
Yes.
2) If so, can this be a container with text that
a browser would be expected or required
to display ?
No. Though many browsers *do* display elements that appear after the
end of the </HTML> element, this can't be relied on.
Can this be a comment which a browser is not
required or expected to display, but which
could be read if a visitor went into source
view ?


Yes. You can also have as much whitespace as you like after the end of
the HTML element.

So basically you're limited to comments, whitespace scripts, and
combinations of the two.

--
Chris
Jul 20 '05 #2

"Philip TAYLOR" <P.******@Rhul.Ac.Uk> wrote in message
news:10*************@news.supernews.com...
Configuring a new instance of IIS, I noticed that it
allows an HTML-formatted document trailer to be appended
to every document served. Unfortunately, on checking
its behaviour, I find that it appends the trailer
/after/ the closing </HTML> of the document, separated
by a blank line. I therefore have a few questions :

1) Assuming HTML 4.01 Transitional, can anything
legitimately follow the closing </HTML> tag ?
No. However, you can put the </HTML> tag at the end of the trailer instead
of into the documents themselves. I don't happen to know *why* you would do
this, without a similar feature being offered for top of the document to
serve the same purpose.

2) If so, can this be a container with text that
a browser would be expected or required
to display ?

or

Can this be a comment which a browser is not
required or expected to display, but which
could be read if a visitor went into source
view ?

3) Is it possible to generalise the answers to the
above so that no matter which DTD is used,
the material following the closing </HTML>
tag is still legal and capable of being
read in some way (when I say "no matter which
DTD", I restrict myself to those currently
promulgated by the W3C, i.e., the HTML 4.01
family (frameset, strict and transitional),
and the XHTML family).

Philip Taylor, RHBNC


Jul 20 '05 #3

"Chris Morris" <c.********@durham.ac.uk> wrote in message
news:87************@dinopsis.dur.ac.uk...
Philip TAYLOR <P.******@Rhul.Ac.Uk> writes:
Configuring a new instance of IIS, I noticed that it
allows an HTML-formatted document trailer to be appended
to every document served. Unfortunately, on checking
its behaviour, I find that it appends the trailer
/after/ the closing </HTML> of the document, separated
by a blank line. I therefore have a few questions :

1) Assuming HTML 4.01 Transitional, can anything
legitimately follow the closing </HTML> tag ?
Yes.


???
2) If so, can this be a container with text that
a browser would be expected or required
to display ?
No. Though many browsers *do* display elements that appear after the
end of the </HTML> element, this can't be relied on.


Might that be because anything that follows the </HTML> tag is invalid and
therefore consistency of treatment, or any treatment at all, can't be
expected?
Can this be a comment which a browser is not
required or expected to display, but which
could be read if a visitor went into source
view ?
Yes. You can also have as much whitespace as you like after the end of
the HTML element.


Well, yes.

So basically you're limited to comments, whitespace scripts, and
combinations of the two.


What is a "whitespace script"? If you mean "script that produces white
space", you can't have a SCRIPT element outside of the HTML element.

Jul 20 '05 #4
"Harlan Messinger" <h.*********@comcast.net> writes:
"Chris Morris" <c.********@durham.ac.uk> wrote in message
Philip TAYLOR <P.******@Rhul.Ac.Uk> writes:
1) Assuming HTML 4.01 Transitional, can anything
legitimately follow the closing </HTML> tag ?


Yes.


???


He asked 'anything', not 'anything useful'.

Thinking about it a little, the obvious solution to the OP's problem
is to take the </body></html> off the end of each normal file, and
(optionally, given that this is HTML 4) put them on the end of the
IIS-included file.
2) If so, can this be a container with text that
a browser would be expected or required
to display ?


No. Though many browsers *do* display elements that appear after the
end of the </HTML> element, this can't be relied on.


Might that be because anything that follows the </HTML> tag is invalid and
therefore consistency of treatment, or any treatment at all, can't be
expected?


Exactly. I thought the 'No' made that clear enough.

Hmm. Given that the OP specified HTML rather than XHTML, do you know
of any browsers that will actually not display text after the </html>?
It'd be reasonable behaviour, but not one I've ever seen in practice.
So basically you're limited to comments, whitespace scripts, and
combinations of the two.


What is a "whitespace script"? If you mean "script that produces white
space", you can't have a SCRIPT element outside of the HTML element.


No, it's a script written in a language consisting entirely of white
space characters. A couple of them exist. I wouldn't expect a browser
to do anything with them, obviously (even inside an appropriate
<script> element), but you could put something even less obvious than
a comment after the </html>.

--
Chris
Jul 20 '05 #5
Chris Morris wrote:
Thinking about it a little, the obvious solution to the OP's problem
is to take the </body></html> off the end of each normal file, and
(optionally, given that this is HTML 4) put them on the end of the
IIS-included file.
You could also omit them enitrely, they are optional in HTML, though it
is good practice to use them. I don't recommend putting the end tags in
a seperate file — it's good practice to always finish every element in
the same file that it was started it. It helps to make sure that
elements don't inadvertently get opened or closed twice. I've seen
several sites that have several opening <html> tags that is most likely
because they didn't follow this guideline. (the only site I could
remember that did this has since been rebuilt, though it still doesn't
validate)
Hmm. Given that the OP specified HTML rather than XHTML, do you know
of any browsers that will actually not display text after the </html>?
It'd be reasonable behaviour, but not one I've ever seen in practice.


Current UAs display any textual content before or after the <html>
element. It's just completely invalid, though that won't stop most
people from doing it anyway. It is, however, more common to see extra
content before <html> rather than after </html>.
So basically you're limited to comments, whitespace scripts, and
combinations of the two.

Technically, I believe you can also have processing instructions. SGML
allows them just like XML, but they won't do anything useful (that I
know of) for any HTML UAs.
What is a "whitespace script"? If you mean "script that produces white
space", you can't have a SCRIPT element outside of the HTML element.


No, it's a script written in a language consisting entirely of white
space characters. A couple of them exist.


I know this is off topic, but I've never heard of any, can you give a
link to some examples? I looked, but could not find anything that even
remotely resembled a script entirely written in white space. Not even
the Hello World page [1] listed such a langage, though it has over 200
other languages.

[1] http://www2.latech.edu/~acm/HelloWorld.shtml

--
Lachlan Hunt
http://www.lachy.id.au/

Please direct all spam to ab***@127.0.0.1
Thank you.
Jul 20 '05 #6
Lachlan Hunt <la**********@lachy.id.au.invalid> writes:
Chris Morris wrote:
Thinking about it a little, the obvious solution to the OP's problem
is to take the </body></html> off the end of each normal file, and
(optionally, given that this is HTML 4) put them on the end of the
IIS-included file.
You could also omit them enitrely, they are optional in HTML, though
it is good practice to use them. I don't recommend putting the end


Wonder how much CSS-related stuff complains. Probably if the start
tags are there it'd be okay.
tags in a seperate file Ñ it's good practice to always finish every
element in the same file that it was started it. It helps to make


Hmm, I tend to have a header and footer include file. Differing
styles. One pass of the validator makes template mistakes fairly
obvious. I don't start things in main and end them in template,
though. As you say that's bad for maintainability.
What is a "whitespace script"? If you mean "script that produces white
space", you can't have a SCRIPT element outside of the HTML element.

No, it's a script written in a language consisting entirely of white
space characters. A couple of them exist.


I know this is off topic, but I've never heard of any, can you give a
link to some examples? I looked, but could not find anything that


http://compsoc.dur.ac.uk/whitespace/

http://compsoc.dur.ac.uk/whitespace/tutorial.html is an example of a
script embedded in a HTML file. (So what mime type should that have,
since it could equally well be a script with an embedded HTML file?)

There's also Acme::Bleach, which encodes Perl as whitespace, and I
think there's another whitespace language but I've lost the link.

--
Chris
Jul 20 '05 #7
Chris Morris wrote:
Lachlan Hunt <la**********@lachy.id.au.invalid> writes:
You could also omit them enitrely, they are optional in HTML, though
it is good practice to use them.


Wonder how much CSS-related stuff complains. Probably if the start
tags are there it'd be okay.


CSS is not affected by the presence of, or lack of optional start and/or
end tags in the source. CSS is only applied to the DOM after the
document has been parsed, so assuming the UA follows the HTML spec, and
builds the correct DOM, everything will work fine.

--
Lachlan Hunt
http://www.lachy.id.au/

Please direct all spam to ab***@127.0.0.1
Thank you.
Jul 20 '05 #8
On Sun, 8 Aug 2004, Lachlan Hunt wrote:
CSS is not affected by the presence of, or lack of optional start
and/or end tags in the source.


That's the theory. A pity that browser implementers often don't
apply the theory.

Jul 20 '05 #9
"Philip TAYLOR" <P.******@Rhul.Ac.Uk> a écrit dans le message de
news:10*************@news.supernews.com
Configuring a new instance of IIS, I noticed that it
allows an HTML-formatted document trailer to be appended
to every document served. Unfortunately, on checking
its behaviour, I find that it appends the trailer
/after/ the closing </HTML> of the document, separated
by a blank line.


You can eventually re-develop the same functionnality with an ISAPI filter.
Not so difficult ! You should post to a microsoft IIS dedicated newsgroup
(microsoft.public.inetserver.iis I think ?)

Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
1
by: Papastefanos Serafeim | last post by:
I want to use the <xsl:document> XSLT command with xalan, but I get the following error message -------- XSLT Error (javax.xml.transform.TransformerConfigurationException):...
3
by: | last post by:
I have been researching articles on google on how to create a simple RSS feed that sucks <title><blurb><link><date> out of a sql server 2000 database via an aspx page. I know it has to be pushed...
1
by: yawnmoth | last post by:
I'm trying to mess around with PHP5's DOM functions and have run into something that confuses me: <?php $dom = new DOMDocument(); $dom->loadHTML('<html></html>'); echo...
5
by: jhurrell | last post by:
I have been having some trouble getting my XSL style sheet to parse correctly. I have some XML outputted from an SQL-Server, that I then need to turn into multiple HTML files. This I have done...
1
by: John | last post by:
Hi var poster="<html><head..... etc .... </html>"; var animal='dog'; The string contains images and text that changes. Originally I wanted to do something like print "<a href=" +...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
3
by: Petterson Mikael | last post by:
Hi, I was running the following in Netbeans 5.5: sing com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl - default JRE XSLT processor. Creating output/NcmiSigTest.java Unsupported...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.