From: Thomas 'PointedEars' Lahn on 3 Jun 2010 09:50 Joe Nine wrote: > Thomas 'PointedEars' Lahn wrote: >> Joe Nine wrote: >>> Thomas 'PointedEars' Lahn wrote: >>>> An empty URI-reference is specified to be a same-document >>>> URI-reference.⁽⁴⁾ You can find that, for example, with the `action' >>>> attribute of FORM elements, too, primarily if the document is >>>> dynamically generated by a server-side application (like PHP).⁽⁵⁾ >>> Wouldn't the same logic apply to an IMG tag with src="" that's being >>> written using document.write? >> >> IMG _element_: Yes, it would. >> >>> As far as can be observed, it doesn't seem to suffer from the same >>> behavior and simply sits there waiting for someone to come along and >>> set it's src attribute. >> >> Do not rely on that; a user agent may prune pointless requests, but it >> does not need to. Do not use empty URI-references anywhere unless you >> mean it. > > There is a case where I deliberately create an iframe element with a > blank src and it doesn't [appear to] load the html into it. If it did, > then it would recurse ad-infinitum. A chain of iframe turtles all the > way down. You realize, of course, that this a case as I described, where it makes a lot of sense for a UA to prune the HTTP request. Still you should not rely on that the iframe stays blank, then. So, again, do not do this. PointedEars -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
From: Joe Nine on 3 Jun 2010 10:17 Thomas 'PointedEars' Lahn wrote: > Joe Nine wrote: > >> Thomas 'PointedEars' Lahn wrote: >>> Joe Nine wrote: >>>> Thomas 'PointedEars' Lahn wrote: >>>>> An empty URI-reference is specified to be a same-document >>>>> URI-reference.⁽⁴⁾ You can find that, for example, with the `action' >>>>> attribute of FORM elements, too, primarily if the document is >>>>> dynamically generated by a server-side application (like PHP).⁽⁵⁾ >>>> Wouldn't the same logic apply to an IMG tag with src="" that's being >>>> written using document.write? >>> IMG _element_: Yes, it would. >>> >>>> As far as can be observed, it doesn't seem to suffer from the same >>>> behavior and simply sits there waiting for someone to come along and >>>> set it's src attribute. >>> Do not rely on that; a user agent may prune pointless requests, but it >>> does not need to. Do not use empty URI-references anywhere unless you >>> mean it. >> There is a case where I deliberately create an iframe element with a >> blank src and it doesn't [appear to] load the html into it. If it did, >> then it would recurse ad-infinitum. A chain of iframe turtles all the >> way down. > > You realize, of course, that this a case as I described, where it makes a > lot of sense for a UA to prune the HTTP request. Still you should not rely > on that the iframe stays blank, then. So, again, do not do this. > > PointedEars Unfortunately I need to do this because of this 5 year old Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=279048 The known workaround is to avoid putting your desired URL into the src attribute when creating the iframe tag via document.write. Instead, leave it blank, and then set it after the iframe is created. Doing this works around the bug.
From: Richard Cornford on 3 Jun 2010 10:37 On Jun 3, 3:17 pm, Joe Nine wrote: > Thomas 'PointedEars' Lahn wrote: <snip> >> You realize, of course, that this a case as I described, where it >> makes a lot of sense for a UA to prune the HTTP request. Still you >> should not rely on that the iframe stays blank, then. So, again, do >> not do this. > > > PointedEars > > Unfortunately I need to do this because of this 5 year old Firefox > bug:https://bugzilla.mozilla.org/show_bug.cgi?id=279048 > The known workaround is to avoid putting your desired URL into the > src attribute when creating the iframe tag via document.write. > Instead, leave it blank, and then set it after the iframe is created. > Doing this works around the bug. For IFRAMEs (and windows opened with - window.open) the result of an empty URL is usually the "about:blank" URL (if that is the right name for it), and given that there is no need to specify the SRC as empty because "about:blank" can be used in its place. Richard.
From: Thomas 'PointedEars' Lahn on 3 Jun 2010 11:15 Joe Nine wrote: > Thomas 'PointedEars' Lahn wrote: >> Joe Nine wrote: >>> There is a case where I deliberately create an iframe element with a >>> blank src and it doesn't [appear to] load the html into it. If it did, >>> then it would recurse ad-infinitum. A chain of iframe turtles all the >>> way down. >> >> You realize, of course, that this a case as I described, where it makes a >> lot of sense for a UA to prune the HTTP request. Still you should not >> rely on that the iframe stays blank, then. So, again, do not do this. > > Unfortunately I need to do this because of this 5 year old Firefox bug: No, you don't. You have every freedom to use a proper default value. PointedEars -- Prototype.js was written by people who don't know javascript for people who don't know javascript. People who don't know javascript are not the best source of advice on designing systems that use javascript. -- Richard Cornford, cljs, <f806at$ail$1$8300dec7(a)news.demon.co.uk>
From: Thomas 'PointedEars' Lahn on 3 Jun 2010 11:28 Richard Cornford wrote: > On Jun 3, 3:17 pm, Joe Nine wrote: >> Thomas 'PointedEars' Lahn wrote: >>> You realize, of course, that this a case as I described, where it >>> makes a lot of sense for a UA to prune the HTTP request. Still you >>> should not rely on that the iframe stays blank, then. So, again, do >>> not do this. >> >> Unfortunately I need to do this because of this 5 year old Firefox >> bug:https://bugzilla.mozilla.org/show_bug.cgi?id=279048 >> The known workaround is to avoid putting your desired URL into the >> src attribute when creating the iframe tag via document.write. >> Instead, leave it blank, and then set it after the iframe is created. Says who? The `src' attribute of the element is #IMPLIED. Avoiding the desired URL does not imply specifying the attribute with a zero-length value. I do not see the workaround you propose mentioned in the bug discussion, and I think you have misunderstood the bug. >> Doing this works around the bug. I doubt it. If there was a workaround, this bug would not have status NEW. > For IFRAMEs (and windows opened with - window.open) the result of an > empty URL is usually the "about:blank" URL (if that is the right name > for it), and given that there is no need to specify the SRC as empty > because "about:blank" can be used in its place. It would appear to be better to refer to a default blank document instead; `about:blank' is not supposed to be interoperable. Given that this IFRAME element is being created with scripting, it might be a good idea to use `javascript:'. Then again, it is not necessary to specify the `src' attribute for this element in the first place. PointedEars -- realism: HTML 4.01 Strict evangelism: XHTML 1.0 Strict madness: XHTML 1.1 as application/xhtml+xml -- Bjoern Hoehrmann
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: See and Enjoy Indian Girls Gallery. Next: Mousewheel event does not support DOM0 in FF |