In our ASP.NET web application, we use our own class to act as a rewrite module. It takes all requests to th开发者_如何学Pythone 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
精彩评论