CakePHP没有布局上的后退和前进按钮 [英] CakePHP no layout on back and forward button

查看:114
本文介绍了CakePHP没有布局上的后退和前进按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Croogo安装程序在CakePHP中构建大型CMS。最近遇到一个问题,当用户点击浏览器中的 back (或 forward

We're building a large CMS in CakePHP with a Croogo install incorporated. We've run into an issue recently where the layout is not rendered correctly when users click the back in the browser (or the forward button for that matter).

你最终得到的视图(.ctp)文件使用 blank layout,所以没有样式,js等任何输入或想法将非常感谢。谢谢!

What you end up with is the view (.ctp) file using the blank layout, so no styles, js, etc. Any input or ideas would be much appreciated. Thank you!

FYI:现代浏览器应该缓存页面请求(缓存已启用),所以我们看看Auth的东西coz它似乎是第一件事将被调用的页面(即使缓存的),正确吗? :S

FYI: modern browsers should cache the page request (cache is enabled), so we're looking at the Auth stuff coz it seems like the first thing that would be called for pages (even cached ones), correct? :S

此外:如果浏览器静置几分钟,然后我们再次点击回来,页面会按预期显示正确的布局吗?会话超时?

Also: if the browser is left standing for a few mins and then we click back and forward again, the pages render as expected with the correct layout?!? Session timeout?

推荐答案

已解决。这个问题是由在默认布局的页脚中的include中调用的一些javascript引起的。

Solved. This issue was being caused by a bit of javascript that was called in an include in the footer of the default layout.

这个线程的解决方案是我们头痛的原因: jQuery .each循环字符串或对象

The solution on this thread was the cause of our headache: jQuery .each loop string or object

这篇关于CakePHP没有布局上的后退和前进按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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