ios - 会话 ID 在 Safari 浏览器的 iframe 中不可见。在 chrome 和 Firefox 中它工作正常
问题描述
在我的网站中,我正在使用 iframe 在 PageA 侧加载 PageB。两个页面都有 ajax 调用。在 Safari 浏览器中加载我的网站时,PageB 没有在 PageA 中正确加载。PageB 未正确加载,因为 PageB 的 ajax 在标头中没有会话 ID。
我的网站在 chrome 和 Firefox 中都能正常工作
编辑 在我的网站中,我有两个 HTML 页面HeaderAndMenu.html和Report.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 没有正确加载。所以报告没有正确加载
解决方案
推荐阅读
- javascript - 来自节点 js 的 jQuery put 请求(用于将 JSON 文件上传到 myjson.com)
- javascript - 与车把上的助手一起工作时遇到麻烦+快递
- javascript - 如何编写自动化测试
- android - Ionic Android 应用程序无法显示具有透明度的颜色
- sql - 最大函数返回多个值 [SQL]
- spring - Spring 4、MVC 和 JPA 集成
- applescript - AppleScript: "use framework" errors out in "Expected end of line, etc. but found identifier."
- javascript - JS Regex solution to turn reddit style links into html?
- animation - 当我使用带有 blit = True 的 matplotlib 动画函数时,如何保留最后一帧
- javascript - 如何制作一个通用的正则表达式来验证通过 JS 输入的 UTF-8 特殊字符?