What is the best way to gzip and cache static images in Asp.net mvc

I am trying to find a better way to speed up the delivery of static images that make up the mvc website design. Images are not copied, not cached on the server or on the client (with the expiration of the content). Possible options:

  • Find out why images are not cached and directly related to IIS6
  • Write a custom http handler
  • Register a special route for still images and write the bynyary actionresult method.

What could be the best solution in terms of performance?

+3
source share
3 answers

The best solution is to let IIS do this.

IIS6 - , .jpg,.png,.gif ..

, , , , IIS, , .

+3

, gzipping , ?

, PNG - ?

, Yahoo, , , pngcrush.

, IIS, (, ) .

+2

There is a good library in the MSDN code gallery that does this. It was called FastMVC .

+1
source

Source: https://habr.com/ru/post/1696457/


All Articles