IE浏览器不会从iframe启动会话吗? [英] IE won't start session from an iframe?

查看:110
本文介绍了IE浏览器不会从iframe启动会话吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任务是使用通过调用服务器的Web API获得的session_id绕过远程服务器上的登录表单.这样该用户就不必两次登录.

The task was to bypass login form on remote server with a session_id acquired through a call to server's web API. So that user wouldn't have to login twice.

由于无法为不同的域设置Cookie.我们想到的是-在远程服务器上放一个小文件,我们将来自隐藏iframe的加密session_id传递给该文件,并应该为远程应用程序启动适当的会话,然后将其加载到另一个iframe中.

Since there's no way to set cookies for different domain. What we came up to was - put a little file on remote server, to which we pass encrypted session_id from hidden iframe and which is supposed to start a proper session for a remote app, which is then loaded in another iframe.

这种方法在FF/Chrome中效果很好,但在IE上却不行...但是,如果我将url从iframe的src属性复制到自制的远程授权脚本到IE的地址栏,然后从那里加载它,则会话get将按预期的方式创建.但是出于某种原因,它只是不想在iframe中执行相同的操作.

This approach works fine in FF/Chrome, but not IE... However if I copy url to self-made remote authorization script from iframe's src attribute to IE's address bar and load it from there, session get's created as expected. But for some reason it just doesn't want to do the same from an iframe.

有人知道这是为什么吗?

Does anyone have any clue, why this is happening?

推荐答案

好,对于IE,我们只是将整个浏览器重定向到授权脚本,然后再将其重定向回.至少以某种方式解决了问题.

Ok, what we did for IEs, we just redirect the whole browser to the authorization script, which then redirects it back again. At least that resolves a problem, somehow.

有人有更好的解决方案吗?

Anyone having any better solution?

这篇关于IE浏览器不会从iframe启动会话吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆