2

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!

Community
  • 1
  • 1
Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289
  • 4
    Why use a whole aspx page when you can write a handler that won't need to go through a full page life-cycle? If you're working on speeding up performance that would probably help more than cookies. – Roman Jun 17 '10 at 11:52
  • This is possibly a very good question. I have absolutely no idea as to its answer. I didn't even know it would be possible to resize and serve and image through a handler... I'm a bit of a newb, I'm afraid. – Chuck Le Butt Jun 17 '10 at 11:56
  • Our developer has put together an .ashx page instead. Will that work? – Chuck Le Butt Jun 21 '10 at 08:28
  • It worked! Thanks for your help. No need to worry about cookies now, either. We're reduced them elsewhere. Thanks! – Chuck Le Butt Jun 21 '10 at 10:42

1 Answers1

1

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).

Roman
  • 19,581
  • 6
  • 68
  • 84