1

This question has been wandering around internet but there is no clear suggestion. I am posting this question to get a clear and direct answer.

I have a website. In the website I have an iFRAME. The iFRAME loads with a URL. The iFRAME URL/Page has a java script that checks the following:

If Browser = Mobile Browser 
Then top location = self location

-> this changes the URL of the browser to the iFRAME URL.

Is there any way to stop the URL Change ?

PS : iFRAME URL is in different domain.

Pradip
  • 1,507
  • 11
  • 28
  • no, you can't access cross domain iframe unless you have control of code within the other domain and can set `document.domain` so each match – charlietfl Nov 04 '14 at 15:21
  • No. I am not saying I should. I am just saying that if the iframe tries to change the parent URL.. how to stop that ? – Pradip Nov 04 '14 at 15:25
  • you can't prevent the script inside iframe from running – charlietfl Nov 04 '14 at 15:28

0 Answers0