I have a website which allows people to view interesting radiology
cases. It is for teaching radiology residents. It is designed to run
in fullscreen or 'kiosk' mode, at 1024 x 768 resolution only. http://www.casespace.net
I designed it with firefox (plus the autohide extension) in mind, but
also want to support IE.
Online and offline it works great in Firefox. Offline it also works
great in IE. The problem is with IE online. I allow the user to cycle
through images with either the page up / page down keys, or with the
mouse wheel, or toggle 'cine' mode with the space bar.
I preload all the images before cycling through them. However, when
viewing it online with IE, cycling through images is slow to the point
that it appears to be downloading them each time.
I am swapping images with a function that re-assigns the 'src' of an
image element.
Any thoughts?
-CJL 6 2263
cjl wrote: [http://www.casespace.net] I preload all the images before cycling through them. However, when viewing it online with IE, cycling through images is slow to the point that it appears to be downloading them each time.
I am swapping images with a function that re-assigns the 'src' of an image element.
Any thoughts?
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.
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).
PointedEars
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, but basically I am
preloading lots of high resolution images, and it's working in Firefox,
but not in IE 6.
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?
-CJL
"cjl" <cj****@gmail.c om> writes: Thomas 'PointedEars' Lahn wrote:
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?
No, he's talking about the HTTP Content-Type header sent by the
webserver. This is rather low-level stuff (that means: JS is not
responsible or capable to change that), but IE indeed doesn't seem to
like documents that are served as application/xhtml+xml.
(I discovered that while toying with VML)
-CJL
Arnaud
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.getEle mentById('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
Thomas 'PointedEars' Lahn wrote: 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.getEle mentById('right _image'); the reference can be stored in a variable once and that variable can be used instead.
Thank you, I will make this change.
Maybe IE's current cache size is just not big enough?
This doesn't seem to be the problem. Let me elaborate. No matter what
the size of the cache is, or the cache settings are, when I dynamically
change the 'src' of an image to a preloaded image in Internet Explorer
there is network activity (I think it is checking to see of the
requested image is the same as the one in the cache). Firefox doesn't
do this, and swaps the image with the preloaded image with no network
activity, and very quickly.
Is there something wrong with the way that I preload images? Or is it
something wrong with the headers my servers sends, as detailed here: http://www.mnot.net/cache_docs/
Is there something happening where image 'src's created statically
(explicitly) are appropriately handled, by dynamic 'src's (generated by
variables) are rechecked before being displayed?
Any help would be greatly appreciated.
-CJL
OK, I'm stumped.
Other scripts which dynamically swap the .src of an image object to a
'variable named' preloaded image do not make IE 6 check the network
against the cache, but my script does.
I am either preloading incorrectly (althought it works in Firefox) or I
am image swapping incorrectly (although it works in Firefox).
Help?
-CJL This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Kennedy |
last post by:
Hello,
I want to create a website which allows students at my college to log in and
list their second hand books for sale. Students would need to log in using
their own individual account, and list the books they have, along with how
much they want to sell them for. All payment would be done offline, so
there would be no need for any online payment facility.
I think PHP / MySQL would be the best approach for this project, but...
|
by: OysterCracker |
last post by:
Hi - I've previously used js to swap images on mouseover in a menu. I'm
stumped on a different situation and would appreciate some advice. I would
like to swap imageA to ImageB when I mouseover imageC. Also, swap imageA to
ImageB when I mouseover a text link. How do I do those?
Thanks,
~OC~
|
by: Erik Schulp |
last post by:
Hi all,
I am using a background image via a stylsheet.
I've used this code: background-image:url("/images/tile.gif"); (which
I think is correct)
The image doesn't show up however, the path, the filename etc etc,
everything checks out ok.
|
by: Dennis Allen |
last post by:
Hi. I have one image that has to show up in a html page several times.
To save time, I'd like to preload this image. As an example:
if (document.images) {
tester = new Image()
tester.onload=function() {cImg('good')}
tester.onerror=function() {cImg('bad')}
tester.src="image.jpg"
}
function cImg(typ) {
|
by: cjl |
last post by:
OK:
I am really scratching my head over a preload / image swapping problem,
so I started conducting experiments:
http://www.saintrays.net/experiment1.html
http://www.saintrays.net/experiment2.html
http://www.saintrays.net/experiment3.html
View the source of each page to see the relevant javascript. All three
| |
by: bkow |
last post by:
I am having this problem
Server Config
System : Sun E250 ( 2 hard disks - One is a mirror) 1 GB ram
OS : Solaris 7
Db2 : version 7.2
Running software raid for mirroring.
The production and failover servers are identical.
|
by: John |
last post by:
Hi
I need to write a vb2005/sql server2005 app running over a LAN. Some users
who use laptop need to have the app to have an offline mode for when they
are away. I am new to net and would like to know what will be the
differences in the online-only and online/offline versions of the app? As
not all users need it, is it possible to configure the app so it knows when
it is in desktop (online-only) or laptop modes?
Thanks
|
by: firstexact |
last post by:
Hi guys,
First post, hope you can help, I have done two sites www.trisant.co.uk and my own www.firstexact.co.uk. The 2 x 2 grid I originally envisaged goes haywire in Firefox as I get a 4 high by 1 wide grid. think it's something to do with my floats and clear both with a <br> in CSS..I have tried everything I can think of, the sites are fine in IE 6/7..Some of the text formatting and the navigation fonts are in different places..
Here's...
|
by: heyi |
last post by:
hi,
i'm making an app which uses a webbrowser control to show some offline (not cache) html pages like a slide show. let's say pages in a folder on the desktop etc...
when it came to testing the whole thing, i figured out that the images in the html are not visible on the webbrowser control. instead there is a space where the image should be, corresponding the actual image dimensions..
and when i right click on this empty space where...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |