浏览器在Joomla $ mainframe-> redirect上进行缓存 [英] Browser caching on Joomla $mainframe->redirect

查看:97
本文介绍了浏览器在Joomla $ mainframe-> redirect上进行缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Joomla驱动的网站,而Safari和新的Firefox缓存重定向存在问题.这是我的意思,用户进入我网站上需要登录的页面,因此我使用$ mainframe-> redirect(loginpage)将其重定向到登录页面,并传递该用户页面的$ _GET变量本来是想去拜访的.

I'm using a Joomla driven site and i'm having problems with Safari and the new Firefox caching redirects. Here's what I mean, a user comes to a page on my site which requires login, so I use $mainframe->redirect(loginpage) to redirect them to the login page, and also passing a $_GET variable of the page that the user was originally trying to visit.

成功登录后,我的脚本重定向回用户尝试访问的页面.在Chrome浏览器中,这可以正常工作,并且可以毫无问题地进行重定向.在Safari和新的Firefox中,它缓存重定向,因此登录后不会重定向回原始页面,而是停留在登录页面上.即使我将原始页面的确切URL放入浏览器中,它仍然会重定向到登录页面.只有清除浏览器缓存后,我才能访问原始页面.

After successful login, my script redirects back to the page which the user was trying to visit. In Chrome, this works fine, and it redirects with no problem. In Safari and the new Firefox, it caches the redirect so it doesn't redirect back to the original page after login, and stays on the login page. Even if I put the exact URL of the original page into the browser, it still redirects to the login page. It's only when I clear the browser cache, can I then access the original page.

如果我没有道理,请告诉我,感谢您能获得的所有帮助.谢谢

Let me know if i'm not making sense, appreciate all the help I can get. Thanks

推荐答案

我发现了问题所在.看起来有些浏览器缓存301重定向,这就是Joomla在$ mainframe-> redirect函数中使用的重定向.我已将其更改为302重定向,并且现在可以正常运行了:-)

I figured out the problem. Looks like some browsers cache 301 redirects, which is what Joomla was using in the $mainframe->redirect function. I have changed it to a 302 redirect and it is now working perfectly :-)

这篇关于浏览器在Joomla $ mainframe-> redirect上进行缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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