473,472 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Re: document.domain obsoleted?

On 18 abr, 19:50, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
>
document.domain does not apply to XHR.
I see. I was mislead due to some hints on the contrary, as well as my
bad memory and the fact that actually it applies someway: if I set
document.domain to a different value that the real one, some XHR in
firefox stop working. I guess that this could qualify for a bug but I
do not know if I am interesting on researching further; it could also
be that document.domain is used in a lateral way, (eg to build the
full URL of relative paths).

The reason is probably that the
former implements a different (older) API than the latter. Note that
document.domain should be read-only per W3C DOM Level 2 HTML, so we are
violating the Spec already with allowing write access to it for accessing
properties that are tainted by default (does anyone here even remember that
NS4 feature?). Therefore, it would appear doubtful whether filing a bug
against it would actually move anything or anyone, but you are welcome to try.
what I find really bad is that then there is no way to do cross-site
XML even in the same main domain.
Jun 27 '08 #1
3 1638
Alejandro Rivero wrote:
On 18 abr, 19:50, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:

document.domain does not apply to XHR.

I see. I was mislead due to some hints on the contrary, as well as my
bad memory and the fact that actually it applies someway: if I set
document.domain to a different value that the real one, some XHR in
firefox stop working. I guess that this could qualify for a bug but I
do not know if I am interesting on researching further; it could also
be that document.domain is used in a lateral way, (eg to build the
full URL of relative paths).

The reason is probably that the
former implements a different (older) API than the latter. Note
that document.domain should be read-only per W3C DOM Level 2 HTML,
so we are violating the Spec already with allowing write access to
it for accessing properties that are tainted by default (does
anyone here even remember that NS4 feature?). Therefore, it would
appear doubtful whether filing a bug against it would actually move
anything or anyone, but you are welcome to try.

what I find really bad is that then there is no way to do cross-site
XML even in the same main domain.
Why not create a single server side resource that does not have these
limitations to fetch all this stuff for you and return it?

You know, something where you could pass the url of the desired
resource, it would open that resource and pass you back the contents.

--

Jun 27 '08 #2
On 18 abr, 23:23, "Tom Cole" <tco...@gmail.comwrote:
Alejandro Rivero wrote:
On 18 abr, 19:50, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
document.domain does not apply to XHR.
I see. I was mislead due to some hints on the contrary, as well as my
bad memory and the fact that actually it applies someway: if I set
document.domain to a different value that the real one, some XHR in
firefox stop working. I guess that this could qualify for a bug but I
do not know if I am interesting on researching further; it could also
be that document.domain is used in a lateral way, (eg to build the
full URL of relative paths).
The reason is probably that the
former implements a different (older) API than the latter. Note
that document.domain should be read-only per W3C DOM Level 2 HTML,
so we are violating the Spec already with allowing write access to
it for accessing properties that are tainted by default (does
anyone here even remember that NS4 feature?). Therefore, it would
appear doubtful whether filing a bug against it would actually move
anything or anyone, but you are welcome to try.
what I find really bad is that then there is no way to do cross-site
XML even in the same main domain.

Why not create a single server side resource that does not have these
limitations to fetch all this stuff for you and return it?

You know, something where you could pass the url of the desired
resource, it would open that resource and pass you back the contents.

--
Yeah, at the end I will probably iframe a single page in the server,
and then dojo-trick.
Jun 27 '08 #3
Alejandro Rivero wrote:

....
Yeah, at the end I will probably iframe a single page in the server,
and then dojo-trick.
I think using an (invisible) iframe is still a very good alternative;
although XMLHttpRequest is more fashionable nowadays. Iframes require
less code and allow cross-domain resources to be loaded (not
scripted); while XMLHttpRequest knows statuses, access to page
headers, multi-threading etc. In think both are possible in your case.

--
Bart
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Cindy Lee | last post by:
Can this be done in https? If the page I'm on is at 'www.abc.com' can I: document.domain='www.def.com' i get invalid argument if i do that? Is there anyway around this?
2
by: Wang, Jay | last post by:
I try to open up a window with window.open in javascript. "domain.html" contains domain information 'domain.school.edu'. The "Access denied" problem happens when document.write is trying to put...
1
by: writeson | last post by:
Hi all, I'm working on a project at the office that pulls together a bunch of our websites into a portal thing and adds a better search engine. We're also trying to accomadate newer browsers...
2
by: johkar | last post by:
I am getting an Access denied error when I write to a new window. The situation and code are outlined below. I am setting the domain in the main window. The problem is that the window I am...
1
by: jkeel | last post by:
Can't seem to figure this out ... I'm trying to do some cross-frame scripting and ... When I do an alert(document.domain) in the onload event of the body I get an empty alert box. Then when...
1
by: vegetablebeef | last post by:
I know cross domain stuff has been discussed here before but I could not find a answer to my issue. I am a designer that does "hunt and peck" coding so again please excuse my lack of technical savy....
1
by: raviviswanathan.81 | last post by:
Hello, So we have a webmaster who sets document.domain to some domain. After that, we try to create and inject text inside an iframe by getting the iframeID.contentDocument (or...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.