阿帕奇/ PHP禁用cookie的子域? [英] Apache / PHP Disable Cookies for Subdomain?

查看:106
本文介绍了阿帕奇/ PHP禁用cookie的子域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图按照这些准则让我的网页加载速度更快。

I am trying to follow these guidelines to make my page load quicker.

我创建了一个静态的子域加载从静态的内容,但它是建议我不要对这个子域发送的cookie,我如何可能能够做到这一点在Apache中/ PHP中的任何想法?

I have created a static subdomain to load static content from, however it is advising me to not have cookies sent on this subdomain, any ideas on how I might be able to do this in Apache/PHP?

我已搜索周围,并拿出什么呢。

I've searched around and come up with nothing yet.

推荐答案

如果你从来没有明确设置一个cookie,饼干不会在服务器上的present。所以,如果你只是使用第二域名作为图像或CSS文件的存储库,最有可能没有任何cookie被设置过

If you never explicitly set a cookie, cookies won't be present on the server. So, if you are using the second domain simply as a repository for images or CSS files, most likely no cookies are ever set.

从评论更新。

如果你看到一个请求饼干头的子域,你不希望有饼干,清除cookies和查看服务器是否曾经在响应头发送一个cookie头。如果是的话,有可能你已经session.auto_start启用,或者你有一个脚本设置的cookie。

If you see a 'Request' cookie header to a subdomain you don't want to have cookies, clear your cookies and see if the server ever sends a cookie header in the Response headers. If it does, it is possible you have session.auto_start enabled, or you have a script that sets cookies.

您可以检查请求和响应头使用像萤火虫与谷歌网页速度。

You can check the Request and Response Headers using something like Firebug with Google Page Speed.

这篇关于阿帕奇/ PHP禁用cookie的子域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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