I recently learned that the UpdatePanel uses HTTP requests with the “no-cache” header added. This causes images inside it to be downloaded on every UpdatePanel update. I do not want this.
So how do I prevent this?
I’ve thought about extending the UpdatePanel control and try scraping out the “no-cache”-part of the requests, but surely there must be a more elegant solution.
The
UpdatePanelwill only put theno-cacheheader on its own request for the update, not on requests to other resources like images. Those are handled by the browser like regular requests, even if they’re inside theUpdatePanelcontent.Perhaps you simply forgot to put an
Expiresheader on your image?