如何保持iframe中加载的第三方应用程序处于活动状态。 [英] How to keep the 3rd party application alive that is loaded in a iframe.

查看:66
本文介绍了如何保持iframe中加载的第三方应用程序处于活动状态。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iFrame包含来自第三方应用的内容。第三方应用程序来自不同的域。用户将大部分时间花在iframe之外。如果用户将大部分时间花在iframe之外,那么第三方应用页面会话将会超时。



有哪些可能的方法可以防止这种情况发生?有没有办法检测并使会话活着?



任何示例代码都表示赞赏。



谢谢

解决方案

如果它是第三方应用程序,据我所知,你可能无法控制它。



所以,无论他们实施什么逻辑,你都不能改变它。您可以请求第三方所有者向您提供此功能。但我认为他们不会为你这样做,因为他们可能会为许多其他人提供服务。



相反,你可以做一件事。只需计算多少非活动时间,应用程序的会话就会发生。



假设在非活动时间10分钟后发生会话。



因此,在第9个非活动时刻(或根据您的业务逻辑),在您的网站上向用户显示一条警告该应用程序将很快开会。请执行你的任务尽快类似的东西。



如果你实施这个,你会警告你的用户,因为他们长时间不活动。

The iFrame has content from a 3rd party app. The 3rd party app is leaded from a different domain. The user will spend most of their time outside the iframe. If the user spends most of their time in the out of the iframe the 3rd party app page session will timeout.

What possible ways are there to prevent that? Is there a way to detect and make the session alive?

Any sample code is appreciated.

Thanks

解决方案

If it is a third party App, so as per my knowledge you may not have the control over it.

So, whatever logic they have implemented, you can''t change that. You can request the third party owner to provide this feature to you. But I think they are not going to do that for you only as they may be providing service to many others.

Instead you can do one thing. Just count after how much inactive time, the app''s session out happens.

Suppose there session out happens after 10 minutes of inactive time.

So, on 9th inactive minute (or as per your business logic), show a alert on your site to the user saying that "The App will session out soon. Please do your task as soon as possible" something like that.

If you implement this, you are warning your user as they are inactive for a long time.


这篇关于如何保持iframe中加载的第三方应用程序处于活动状态。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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