Search code examples
javascripthtmlajaxsandbox

Using iframes to protect the rest of a page from scripts in 3rd party proxied-in div


I have taken over a "dashboard" application that displays lots of goodies.

One of the things displayed is a div that is populated by the content of a 3rd party webpage (which auto-refreshes it's own contents). Unfortunately the javascript in the imported 3rd party webpage affects/refreshes the entire page it sits on.

Is there a way I can display the content of the 3rd party page on my own page, while at the same time sandboxing it to prevent it from accessing/affecting the page it sits on?


Solution

  • I suggest that you use iframe element and put the div element into it