对于IE 8及更早版本的F5重新提交案例,无法重定向到页面本身 [英] Can NOT Redirect to Page Itself in F5 Resubmit Case for IE 8 and earlier version

查看:75
本文介绍了对于IE 8及更早版本的F5重新提交案例,无法重定向到页面本身的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试阻止在按F5刷新时重新提交表单。

I'm trying to prevent resubmitting form when press F5 to refresh.

想法是使用"POST-Redirect-Get"图案。我将一个隐藏字段存储在页面中的post标志中,将其与我在会话中存储的标志进行比较。如果值不相同,那么我知道当前帖子是F5重新提交帖子。我将重定向到当前页面
本身以避免双重提交。

The idea is to use the "POST-Redirect-Get" pattern. I put a hidden field to store the post flag in page, compare it with the flag I stored in session. If the value is not same, then I know current post is a F5 resubmit post. I'll redirect to current page itself to avoid double submittion.

在IE9(包括campatibility模式),Chrome14,Firefox4中,它运行良好。但是在IE 8及更早版本中,IE收到服务器的302重定向响应后,没有"Get"消息。并且页面变成空白。

In IE9(including campatibility mode), Chrome14, Firefox4, it works well. But in IE 8 and earlier version, after IE recieved a 302 redirect response from server, there's no "Get" and page become blank.

IE8及更早版本中是否存在缺陷?

Is it a defect in IE8 and earlier?

在IE9中:

在IE8中:

推荐答案

您好,

在connect.microsoft.com/ie上可能已经有一个已关闭的发票

there may already be a closed issue ticket at connect.microsoft.com/ie

这是网络开发者的公共论坛....所有针对Ie 10的反馈应该提交给连接....

this is the public forum for web developers.... all feedback for Ie 10 should be submitted to connect....

你有没有验证你的标记?双重表单提交可能是由嵌套的< form>引起的标签或无效的标记或document.write语句。通常在jsp Web应用程序中。

Have you validated your markup? double form submission may be being caused by nested <form> tags or invalid markup or document.write statements. Commonly in jsp web applications.

问候。


这篇关于对于IE 8及更早版本的F5重新提交案例,无法重定向到页面本身的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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