سؤال

In our ASP.NET web application, we use our own class to act as a rewrite module. It takes all requests to the server, acting as a bootstrapper.

To access an image on our web application, the browser requests domain.com/ResourceItem.aspx?Id=74

Does not having a proper URI mean the server will never respond with 304 NOT MODIFIED?

Does anyone have any ideas how to get the 304 response, so the browser doesn't have to download each image every refresh?

هل كانت مفيدة؟

المحلول

Here is link to useful blog with answer to your problem: http://weblogs.asp.net/jeff/archive/2009/07/01/304-your-images-from-a-database.aspx

Good luck! :)

نصائح أخرى

The HTTP 304 is doing just that. Its simply communicating to the browser that the resource has not been modified, and therefore the browser should use its cache. It should already be working as you ask - the browser shouldn't be

downloading each image every refresh

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top