473,805 Members | 2,042 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: document.domain obsoleted?

On 18 abr, 19:50, Thomas 'PointedEars' Lahn <PointedE...@we b.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 1658
Alejandro Rivero wrote:
On 18 abr, 19:50, Thomas 'PointedEars' Lahn <PointedE...@we b.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.c omwrote:
Alejandro Rivero wrote:
On 18 abr, 19:50, Thomas 'PointedEars' Lahn <PointedE...@we b.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
7597
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
6090
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 variable s into the new window. Sometimes, it writes successfully, while other times the popup error is "access denied". How to solve this problem? thanks ____________________________ function setup(){ var w =
1
4108
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 (Netscape 7.2, Firefox, Safari) and are having some problems. The websites run on different servers, all of which we control, so we are setting the document.domain = "ourdomain.com"; in some javascript on ever page. However, we're having problems....
2
22655
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 popping up never gets it domain set, even though I have coded it to be the same as the main window. I get an Access Denied errror. Four different domains: *localhost.mycompany.com *test.mycompany.com *pilot.mycompany.com
1
6504
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 I try to set the document.domain I get an Invalid argument. Why am I getting nothing returned when I do the initial
1
2807
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. Anyway here is the issue. I was trying to load external pages from content.mydomain.com into pages on web.mydomain.com. (I can not put all the pages into one place because the cma that my company uses only lets me put the text of the master page...
1
6517
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 iframeID.contentWindow.document for MSIE). This results in an 'access denied' issue in MSIE (No problem in Mozilla). Note that if there is document.domain initialization before this iframe creation/content injection, there is no problem and all works well.
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
jinu1996
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...
1
10366
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9185
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7646
isladogs
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...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.