stop cross-domain IFRAME links to open in "_top" target
My page loads an IFRAME
with content from another domain (and I don't have control over the content) that contains links with target="_top"
attribute. 开发者_运维问答My page gets completely replaced once the user clicks on one of these links. Since my page is a stateful web application it would confuse the user.
Is there a way/trick to stop those IFRAME links to do so? They should either (visually) load within the IFRAME
or open in a new window.
I don't want to proxy the IFRAME using a server script and alter the HTML code since this would block any user cookies for the foreign domain.
Perhaps some special trick like nested IFRAMEs or whatever could do this?
精彩评论