<a href="javascript:window.frames.foo.document.location='http://bar';"> loads favicon

RESOLVED WORKSFORME

Status

()

Core
DOM: Core & HTML
RESOLVED WORKSFORME
16 years ago
16 years ago

People

(Reporter: Aaron Kaluszka, Assigned: jst)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
<a href="javascript:window.frames.foo.document.location='http://bar';"> loads
the favicon of the string even when the actual result of the command does not
load that page.
2002060208
(Reporter)

Comment 1

16 years ago
Created attachment 86072 [details]
Testcase

Comment 2

16 years ago
Win98 Build 2002060108.  For your testcase, I don't get the behavior you
describe (the favicon loading), but when I click on the link...
1) The URL http://www.mozilla.org/ does not load in the iFrame
2) javascript:...etc actually appears in the location bar
2) The page just displays the words about:blank (from iFrame's src attribute)
and View Page Source is absolutely blank
On the other hand, when I change your example link from:
<a hRef="javascript:..."> to <a hRef="#" onClick="javascript:...; return false">
things work fine.  So either 1) this is really a bug and what I have given is a
workaround, or 2) you are doing things the wrong way.  I honestly don't know which.
(Reporter)

Comment 3

16 years ago
This was already discussed in bug 148799.  The point was that my code should
only write out a string, yet it somehow seems to be calling the page since it
loads the favicon from it.  However, I am having trouble reproducing the issue
on my home PC, but I have an older build.  Will need to investigate more...
(Assignee)

Comment 4

16 years ago
Yes, the javascript: URL does *initiate* the loading of the URL you're setting
location to in the javascript: URL, but the iframe you're setting it on is torn
down before the load completes. Seems like the favicon stuff is kicked off
before the iframe is torn down tho...
(Reporter)

Comment 5

16 years ago
There must be some sort of race condition happening.  On my home PC, using an
older build 20020511, the favicon does not appear, yet the iframe does load
before the javascript-generated page.  On my work PC with build 20020602 it does
not (usually, but occasionally does) load the page, and the favicon does appear.

Comment 6

16 years ago
This might be a dup of bug 109672, "site icon for iframe content is shown as
proxy icon".
(Reporter)

Comment 7

16 years ago
I can't reproduce this anymore.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.