重新加载页面时用户从后退按钮到达 [英] Reloading page when user arrives from back button

查看:157
本文介绍了重新加载页面时用户从后退按钮到达的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个一般性的错误页面,任何处理错误会重定向到。我有一个管理页面,当用户调用一个错误,用户被带到错误页面,击中从错误页面后退按钮导致管理页面无法正常加载。

I have a generic error page, that any handled error will redirect to. I have an admin page that when the user invokes an error, and the user is brought to the error page, hitting the back button from the error page cause the admin page to load improperly.

所以,我需要的是重新载入管理页面时,我从错误页面的方式。我已经尝试设置无缓存和这样的管理页面,并检查回发,但没有任何工程。设置没有缓存,似乎什么也不做,并在管理页面的功能的document.ready任何JavaScript不会被调用无论是。是否有任何其他方式来获得这种情况?

So what I need, is a way to reload the admin page when I come from the error page. I have tried setting no cache and such on the admin page, and checking for a postback, but nothing works. Setting no cache seems to do nothing, and any javascript on the admin page's document.ready function does not get called either. Is there any other ways to get this to happen?

编辑:

我还要提到的是我已经注意到,在表丢失2单元我最近添加。这使我相信,有被缓存的页面的老态的地方,虽然清除浏览器缓存和重新启动我的服务器没有帮助的。

I should also mention that I have noticed that a table is missing 2 cells I recently added. This makes me believe that there is a old state of the page being cached somewhere, although clearing the browser cache and restarting my server do not help at all.

EDIT2:

此外,设置在window.onload()被核爆当我再回到管理页面

Also, setting window.onload() gets nuked when I come back to the admin page

推荐答案

因此​​,原来这只是一个IE9的问题。我的onload方法,只是从未得到调用。工作在其他浏览器的罚款。

So it turns out this is just an IE9 issue. My onload method was just never getting called. Works fine in the other browsers.

我为了得到这个在IE9工作,使该修补程序,以及是一个查询字符串添加到页面,这样,当我回来的网页,IE9将返回到浏览器切开查询字符串已经改变或需要被重新评估。

The fix I had to make in order get this to work in IE9 as well was to append a query string to the page, so that when I come back to the page, IE9 will go back to the browser incise the query string has changed or needs to be re-evaluated.

感谢你们俩家伙,或帮助帮我找到这个问题。

Thanks to both of you guys, or help helped me find the issue.

这篇关于重新加载页面时用户从后退按钮到达的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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