Way to detect “Refused to display document because display forbidden by X-Frame-Options.” error? [duplicate]

可紊 提交于 2019-12-03 14:29:53
DusanV

Had a same problem and the only solution found was to check if iframe finished loading after some time:

$(function () {
    $('#DtLoadingIframe').on('load', (function () {
        clearTimeout(errloading);
    }));

    var errloading = setTimeout(function () {
        window.location = "App.aspx";
    }, 5000);
});

So actually, users that approved my app, are now "automatically" signed in within iframe.

Others are redirected after 5 seconds (for those 5 seconds I have some small text explaining the situation).

Perhaps it could be done better by using this approach?

http://static.jtwb.dotcloud.com/test-cases/html/content-disposition-attachment.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!