|
Posted by Jukka K. Korpela on 09/10/06 09:39
G Doucet <someone@somewhere.nb.ca> scripsit:
>- - I am currently working on a small "quick-reference"
> web site for my work. I am creating it on my home computer, and then
> emailing the htm and image files to my work laptop.
Others have suggested that you use email software other than Outlook Express
or send the files as zipped (which is easy when using Windows XP, since it
has built-in support to zipping). I guess either of those approaches is
sufficient for the problem you describe here and in your Subject: header,
but there's a little more.
> Also, I noticed that some links were no longer working and that while
> viewing files on my own hard drive, I could see on the bottom right
> of the Internet Explorer window that it was treating some of my files
> as if they were risky - showing the red circle with the white bar.
As far as I can see, the problem is that IE treats such a local file as
belonging to "risk zone" - even though if you view the Internet settings,
they probably show the risk zone as empty. This is tough for developers, but
it's meant to protect users who might have copies of www pages on their disk
without knowing about the problems. (Changing the properties of the risk
zone might not be a good idea, since some day you might really want to put
some sites into the risk zone.)
Thus, to test pages containing JavaScript code, it is best to test them
after uploading them onto a www server (though before announcing them or
linking to them). Naturally you can and normally should test everything else
locally. That way you will automatically test that the page works _somehow_
when JavaScript is disabled, too.
> Well first, I found that when I email a file from my laptop to my
> home computer, it sets some kind of file attribute, and Internet
> Explorer will treat this as a risky file, unless I clear this
> attribute in the file's properties.
Well spotted.
> Second, I found that when I email a file from my laptop to my home
> computer, it adds the comment text <!-- saved from
> url=(0022)http://internet.e-mail --> to the top of my html code and
> thus some links don't appear to work unless I remove this comment.
That sounds strange. Which kinds of links don't work? Are you referring just
to links to images as described later?
Anyway, that comment is harmful as such, since _anything_ before the
<!DOCTYPE> declaration throws IE into "quirks mode" (i.e., intentionally
broken mode of operation where IE 6+ simulates errors of older versions of
the browser).
> BTW, is it my Outlook Express adding this, and if so, can I turn off
> this feature?
It's certainly OE _on saving_ the file. The email message that you send with
IE does not contain such a string. OE adds it when saving the file (and even
if you just click on the attachment icon to open it in a browser).
> Third, I found that my IE6 will show that popup message on local
> files (for some reason) but I also found that I could add the
> following to the top of my html file as a workaround <!-- saved
> from url=(0014)about:internet --> to apparently get Internet Explorer
> to think it's a file from the Internet?
That's quite astonishing. Apparently IE treats local files as being in the
risk zone _unless_ they have that magic comment _and_ have the "risky file
from the Internet" flag cleared. I might see some strange logic behind this,
which probably means I'm getting mad and they are going to take me away...
The way I see is that IE actually _prevents_ JavaScript execution in this
case, or makes dependent on the user's permission, depending on the security
settings for the risk zone.
> Now this workaround comment (as I call it) does get rid of that
> annoying popup, but it creates another problem for me. My anchors
> that are linked to images no longer work. For example:
> <a href="image.gif>motor gears</a>
I was able to reproduce the problem but then I got very confused: removing
the comment did not change the situation, and for a copy of the file things
were different. I should probably start testing from scratch (with a file
that just created locally) - but I think I've seen enough and will just
avoid using OE to receive HTML attachments.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|