3

I have a website and my domain is registered through Network Solutions (who I would not recommend). I'm using their Web Forwarding feature which allows me to "mask" my domain so that when a user visits http://lucasmccoy.com they are actually seeing http://lucasmccoy.comlu.com/ through an HTML frame. The advantages of this are that the address bar still shows http://lucasmccoy.com/.

The disadvantages are that I cannot directly edit the HTML page in which the frame is owned. For example, I cannot change the page title or favicon. I have tried doing it like so:

$(function() { parent.document.title = 'Lucas McCoy'; }); 

But of course this gives me a JavaScript error:

Unsafe JavaScript attempt to access frame with URL http://lucasmccoy.com/ from frame with URL http://lucasmccoy.comlu.com/. Domains, protocols and ports must match.

I looked at this question attempting to do the same thing except the OP has access to the other pages HTML whereas I do not.

Is there anyway in JavaScript/jQuery to make a cross-domain request to the DOM when you don't have access to that domain? Or is this something browsers just will not let happen for security reasons.

1
  • You may check this article madskristensen.net/post/…. It's forbidden because security reasons but if you really have to do it there are some workarounds Commented Apr 18, 2010 at 22:23

1 Answer 1

5

No. Most browsers implement the same origin policy.

Sign up to request clarification or add additional context in comments.

1 Comment

This is what I was afraid of.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.