缓存标头 CakePHP

发布于 2024-12-29 17:39:20 字数 816 浏览 2 评论 0原文

早上好,伙计们,

首先 - 安息吧 TPB!欢迎荷兰人访问 malaysiabay.org <3

好的,说到正题!两周以来,我一直在使用 Cake 框架,并为 Android 用户使用 jQuery 开发移动 Web 应用程序。因为它是一个移动应用程序,所以我试图尽可能缩短加载时间。 Google 在速度测试方面为我提供了很多帮助,但他们告诉我添加带有过期日期的 php 标头...我明白我也做了什么,但无论我尝试什么.. CakePHP 框架总是否决我的定制标头。你能告诉我cake如何处理http-headers..或者告诉我网页上还有什么改进吗?

示例: http://www.naviplan.nl/pages/routeportal/2/2/ < /一>

<一href="https://developers.google.com/pagespeed/#url=http_3A_2F_2Fwww.naviplan.nl_2Fpages_2Frouteportal_2F2_2F0_2F&mobile=false&rule=LeverageBrowserCaching" rel="nofollow">https://developers.google.com/pagespeed/#url=http_3A_2F_2Fwww.naviplan.nl_2Fpages_2Frouteportal_2F2_2F0_2F&mobile=false&rule=LeverageBrowserCaching

感谢您的帮助!

Goodmorning lads,

First of all - R.I.P TPB! Welcome malaysiabay.org for the Dutchies <3

Ok, on topic! Since 2 weeks I'm inside the Cake framework and working on a mobile webapp with jQuery for Android users. Because it's an mobile app I'm trying to get the loading time as low as possible. Google helps me a lot with their speedtest but they're telling me to add php headers with an expire date... I understand what I've got too do, but whatever I try.. the CakePHP framework is always overruling my custom made headers. Can you tell me how cake handles the http-headers.. or tell me what too improve on the webpage?

Example: http://www.naviplan.nl/pages/routeportal/2/2/

https://developers.google.com/pagespeed/#url=http_3A_2F_2Fwww.naviplan.nl_2Fpages_2Frouteportal_2F2_2F0_2F&mobile=false&rule=LeverageBrowserCaching

Thanks for your help!

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

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

发布评论

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

评论(1

弱骨蛰伏 2025-01-05 17:39:20

好吧,我明白了。
安装 Chrome 的插件 Page Speed 后,它检查了所有错误的 html / css 并为我提供了一个很好的解决方案。减少图像大小、CSS 大小和整体页面加载。

我还让 CakePHP 再次完美运行,更改了 core.php 中的一些行,解决了缓存问题。

Ok, I figured it out.
After installing Chrome's plugin Page Speed it checked all the wrong html / css and gave me a good solution for it. Decreasing it's imagesize, css-size and the overall page loading.

I also got CakePHP running flawlessly again, changed some row in my core.php which fixed the caching problem.

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