Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6562689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:44:19+00:00 2026-05-25T13:44:19+00:00

while i know that xss rules should apply to iframed content if the domain,

  • 0

while i know that xss rules should apply to iframed content if the domain, protocol etc do not match, i was wondering if there is any way to further ensure that iframed content cannot access the parent via javascript.

for example, even if the domain port and protcol DO match.

the basic idea is as such:

1) domain.com contains multiple iframes containing 3rd party advertisements

2) the iframes that contain the banner code are hosted on ads.domain.com

3) in most cases, the 3rd party advertisements are loaded via something like, inside the frames that are hosted on ads.domain.com:

<script type="text/javascript" src="http://www.3rd-party-ad-provider.....

is there any further steps we can take to end up with a scenario as follows:

3rd party < HAS ACCESS > ads.domain.com < NO ACCESS > domain.com (parent holding the ad iframes)

even steps that are only compatible on recent browsers are welcome. anything to improve this. we are seeing quite a bit of js errors leaking thru and i am assuming that at least some of it is caused by faulty ad code mangling the parent (top-est) document body.

merci!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:44:20+00:00Added an answer on May 25, 2026 at 1:44 pm

    while i know that xss rules should apply to iframed content if the domain, protocol etc do not match, i was wondering if there is any way to further ensure that iframed content cannot access the parent via javascript.

    Nothing that works cross-browser or without side effects.

    3rd party < HAS ACCESS > ads.domain.com < NO ACCESS > domain.com (parent holding the ad iframes)

    The same origin policy does that.

    we are seeing quite a bit of js errors leaking thru and i am assuming that at least some of it is caused by faulty ad code mangling the parent (top-est) document body.

    If JS errors in a frame, then it still errors. It shouldn’t touch the top level frame, but browsers will report the errors.

    Since you are dealing with third party content, you can’t catch the errors.

    You could simply take a hard line with the advertisers and reject adverts that don’t pass quality control. You’ll have to weigh the cost of turning adverts down with the benefits of the improved experience for visitors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now while I know that you can not perform inheritance like you would in
What are some key UI design tips that every developer should know? While there
I know that it is not allowed to remove elements while iterating a list,
While I was working on an assignment, I came to know that we should
hi all i want to know that while specifying url in my iphone native
I have played around with Scala for a while now, and I know that
Also I want to know how to add meta data while indexing so that
Just out of curiously, what is d:IsOptimized in Expressions Blend? While I know that
I know that it might sound silly but, while working on project at some
I've been developing with JS for a while, and while I know that code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.