当页面从服务器刷新时不刷新网页中的小程序或任何其他建议?

发布于 2024-12-18 01:58:30 字数 213 浏览 3 评论 0原文

我有一个网站,我在其中实现了使用 VoIP 服务拨打和接听电话的功能。我正在使用小程序 JAR 文件进行调用操作。现在,如果呼叫正在运行并且我刷新页面,那么呼叫就会断开,这是可以的。我需要实现这样的功能:如果呼叫进入网站,页面将在后台重新加载,并显示呼叫者信息。现在,如果刷新页面,则呼叫将断开。

有没有什么方法可以不重新加载小程序,或者有任何其他方法可以使呼叫不会断开并且代理将在后台播放网站?

I have website where I have implemented the functionality to call dialing and call receiving using voip services. I'm using applet JAR file for call operation. Now if call is running and I refresh the page then call is getting disconnected that is ok. I need to implement the function where if call comes in to website then page will be reloaded in background and it will display the caller information. Now if page is refreshed then call is getting disconnected.

Is there any way to not reload the applet or any other way by which call will not disconnect and agent will play with the website in background?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

岁月流歌 2024-12-25 01:58:30

有没有办法不重新加载小程序或任何其他方式
呼叫不会断开,代理将在以下位置访问该网站
背景?

据我所知,当用户单击浏览器栏上的刷新按钮时,您无法停止执行刷新。如果发生这种情况,这将侵犯他的隐私,也是安全漏洞。

旁注:有一种方法 当网页尝试自行重定向/重新加载(例如元重定向)时警告用户,但这并不能解决您的问题,因为客户端必须手动执行此操作,并且 当您故意重定向客户端。

Is there any way to not reload the applet or any other way by which
call will not disconnect and agent will play with the website in
background?

As far as my knowledge goes, there is NO WAY you can stop from executing a refresh when the user clicks the refresh button on his browser bar. If that had happened, it would be an invasion of his privacy and also a security breach.

On a side note: There is a method to warn users when a webpage tries to redirect/reload on its own (such as a meta redirect), but that doesnt solve your problem as the client has to do it manually, and is alerted when you intentionally redirect the client.

摘星┃星的人 2024-12-25 01:58:30

嗯......我不太确定你想要达到的效果的标准方式,但我已经面对过这个问题,但就我而言,我试图向后解决它,我的意思是让小程序在需要时“刷新”其用户界面: )
您在问题中描述的效果可以通过使用静态 Swing 组件来实现,因为标准 JRE 小程序缓存重新加载设置(应在刷新每个 Internet 浏览器小程序网页上重新加载 jre),通常设置为“ false"


您可以通过在小程序中使用静态 JPanel 作为示例来看到非重新加载效果

这里有一些想法提示...
...

static JPanel aPanel=new JPanel(new FlowLayout());
static int i;
...

init()
{
...
aPanel.add(new JLabel("Hello World, say "+(++i)));
}

刷新您的小程序网页几次,看看会发生什么。希望有帮助祝你

好运

Emm... I am not pretty sure about a standard way the effect you want to achieve but I have faced the thing but in my case I was trying to solve it backward I mean make applet "being refreshed" its UI when it needed :)
The effect you describe in your question can be achieved by using static Swing components because standard JRE applet cache re-load setting (which should reload jre on each Internet Browser applet web page is refreshed), as a rule, set to "false"


You can see the non-reload effect by using, as an example, static JPanel in your applet

Here some idea tips...
...

static JPanel aPanel=new JPanel(new FlowLayout());
static int i;
...

init()
{
...
aPanel.add(new JLabel("Hello World, say "+(++i)));
}

refresh your applet web page a few times and see what happens. Hope that helps

Good luck

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文