Akamai 设置中的域级 Cookie
有人在使用 Akamai 实施运行域级 cookie 时遇到过问题吗? 该站点发布一个域级 cookie,其中包含其他应用程序使用的 2 个值。 如果混合使用 Akamai,则永远不会生成 cookie。当我将 Akamai 排除在外时,一切都正常。不确定其他人是否见过这种行为。我不清楚 Akamai 如何处理 cookie。
Has anyone had a problem in running domain level cookies with Akamai implementation?
The site issues a domain level cookie which contains 2 values which are used by other apps.
With Akamai in the mix, the cookie never gets generated. When I take Akamai out of the mix, everything works fine. Not sure if anyone else has seen this behavior. I am not clear on how Akamai handles cookies.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认情况下,Akamai 会从缓存资源中删除 cookie。
逻辑(明智地退出)是 cookie 被设计为特定于每个浏览器/用户,因此缓存它们没有意义。
我的建议:
1. 检查相关资源是否被缓存。您可以使用 Akamai 浏览器插件来实现此目的
2. 仔细思考为什么您希望在缓存资源中保存 cookie
3. 如果您确定确实需要这些 cookie,请联系 Akamai。他们可以为您改变这种行为
Akamai, by default, strips cookies from cached resources.
The logic (quit sensibly) is that cookies are designed to be specific to each browser/user, so caching them makes no sense.
My advice:
1. Check if the resource in question is being cached. You can use the Akamai browser plugins for this
2. Think carefully why you would want cookies in a cached resource
3. If you are sure you do want these cookies, contact Akamai. They can change this behaviour for you
作为替代方案,您仍然可以缓存这些页面:您需要在未缓存的 URL 中定义 cookie,该 URL 应在缓存的页面内调用,例如作为标记。
这样,您就可以根据缓存页面中的 cookie 从 JS 执行重定向、AJAX 调用或 DOM 操作。
As an alternative, you can still cache those pages: you'd need to define the cookies in an uncached URL, which should be called inside the cached pages, for example, as a tag.
That way you can do redirects, AJAX calls, or DOM manipulation from JS depending on cookies from within cached pages.