cjl wrote:
Thomas 'PointedEars' Lahn wrote: It would be prudent if you posted at least the URL of the script
you are referring to as the above website does not include one.
Of course. Sorry. Here it is:
http://casespace.net/data/library.js
The code is complicated, and poorly written,
It's better than I have come to expect of such scripts, yet there are
some possibilities of improvement left. For example, you need the
reference to the element with ID 'right_image' very often. It is
highly inefficient to obtain that reference every time it is needed
with document.getElementById('right_image'); the reference can be
stored in a variable once and that variable can be used instead.
Compare: <http://PointedEars.de/scripts/test/hoverMe/>
but basically I am preloading lots of high resolution images, and
it's working in Firefox, but not in IE 6.
Maybe IE's current cache size is just not big enough?
It would also be prudent if you did not serve XHTML als text/html
but HTML as text/html (since XHTML [as application/xhtml+xml] is
not supported by IE).
I'm not sure I understand this comment. Are you referring to the
doctype?
Exactly. As Internet Explorer does not support XHTML, such markup
is subject to error-correction where the SGML NET delimiter is ignored
(in HTML, <br /> is equivalent to <br>>). Firefox and all other
Mozilla/5.0 based user agents support XHTML, however to have it parsed
as XHTML and not as error-corrected HTML, it has to be served with
the proper XHTML Content-Type: application/xhtml+xml. Unfortunately,
IE does not accept responses with this Content-Type since it does not
understand XHTML. There are other ramifications in using XHTML, such
as that document.write() cannot be used since it is not properly
implemented in the XHTML DOM although specified for XHTML 1.0 Transitional
in W3C DOM Level 2 HTML. So nowadays it is still best to not use XHTML
at all if not needed (for example when embedding SVG or MathML).
<http://www.hixie.ch/advocacy/xhtml>
PointedEars