0

When testing my website on tools.pingdom.com I get a warning that I should compress components with Gzip and also that I should add expires headers. I have set Common headers in IIS to 7 days, but this does not seem to help. Is there a programmatic way to set this?

Bjørn Hellesylt
  • 805
  • 2
  • 7
  • 10
  • I added this code, but does not seem to make a difference: Response.Headers.Append("Expires", DateTime.Now.AddDays(30).ToUniversalTime().ToString("R")); – Bjørn Hellesylt Feb 04 '23 at 10:21
  • Take a look at the docs: https://learn.microsoft.com/en-us/aspnet/core/performance/response-compression – Mike Brind Feb 05 '23 at 07:49

0 Answers0