是否可以在不在浏览器上设置 cookie 的情况下提供 ASPX 页面?
我们正在尝试通过提供 来自无 Cookie 域的静态内容。这似乎进展顺利,但我有一个新问题:
我知道我们在从无 cookie 域提供服务时谈论的是“静态内容”,但我们也有由 ASPX 页面提供的静态内容,特别是图像。例如:(
domain.com/resizeImages.aspx?src=images/image123.jpg&width=400&height=400
注意:显然,上面的内容将位于 标记中。)
非常标准的东西,尽管它由托管代码提供,但它仍然是静态图像。
所以我的问题是:如何在 ASP.NET 在浏览器上设置 cookie 的情况下提供 resizeImages.aspx 图像? (目前它设置了一个 ASPXANONYMOUS cookie。)
感谢您的帮助!
we're in the process of trying to speed up the performance of our website by serving static content from a cookieless domain. That seems to be going well, but I have a new question:
I know that it's "static content" that we're talking about when serving it from a cookieless domain, but we also have static content being served by ASPX pages, specifically images. For example:
domain.com/resizeImages.aspx?src=images/image123.jpg&width=400&height=400
(Note: The above would be in an <img>
tag, obviously.)
Pretty standard stuff, and although it's being served by managed code, it's still a static image.
So my question is: How can I serve the resizeImages.aspx image without ASP.NET setting a cookie on my browser? (At present it sets an ASPXANONYMOUS cookie.)
Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
cookie 的用途之一是跟踪您的会话令牌,您可以尝试 禁用状态 该页面,看看它是否会使 cookie 消失(尽管自定义处理程序可能是更好的解决方案)。
One of the things cookies are used for is to keep track of your session token, you could try disabling state for that page and see if it makes the cookie go away (though a custom handler would probably be a better solution).