首页 > 解决方案 > 会话 ID 在 Safari 浏览器的 iframe 中不可见。在 chrome 和 Firefox 中它工作正常

问题描述

在我的网站中,我正在使用 iframe 在 PageA 侧加载 PageB。两个页面都有 ajax 调用。在 Safari 浏览器中加载我的网站时,PageB 没有在 PageA 中正确加载。PageB 未正确加载,因为 PageB 的 ajax 在标头中没有会话 ID。

我的网站在 chrome 和 Firefox 中都能正常工作

编辑 在我的网站中,我有两个 HTML 页面HeaderAndMenu.htmlReport.html

网址是

https://example.com/Mywebsite/HeaderAndMenu.html https://example.com/Mywebsite/Report.html

我正在加载 Report.html 的 HeaderAndMenu.html 中有一个 div。

在 Report.html 中,我有一个 iFrame,我正在通过 javascript 加载以下 URL

$( document ).ready(function() {

var Report_form = document.createElement('FORM'); 
    Report_form.method='POST';
    Report_form.action='api/Reports/jsp/loadreports';

$('#myframe').empty().contents().find('body').append(Report_form);
    Report_form.submit(); 

});

https://example.com/Mywebsite/api/Reports/jsp/loadreports

问题

loadreports有 ajax 调用、js、图像和 css

在 iPhone Safari 12 中,所有 CSS、JS、ajax 都在加载第 2 次加载,从第 3 次加载开始,js 和 css 没有正确加载。所以报告没有正确加载

标签: iosiphoneiframesafari

解决方案


推荐阅读