3

I have an asp.net mvc site that runs on umbraco and uses asp.net bundling to bundle css and js files. But the bundles don't get cached in chrome and it reloads them every time.

I tried IE, Opera and Firefox and they all cache the bundles fine.

Here are the http response headers returned for the bundles:

Cache-Control:public
Connection:keep-alive
Content-Encoding:gzip
Content-Length:47948
Content-Type:text/css; charset=utf-8
Date:Wed, 06 Jan 2016 07:47:26 GMT
Expires:Thu, 05 Jan 2017 07:47:26 GMT
Last-Modified:Wed, 06 Jan 2016 07:47:26 GMT
Vary:User-Agent,Accept-Encoding

An I tested on chrome 47.

Thanks.

Amila
  • 2,779
  • 1
  • 27
  • 31

1 Answers1

0

In my case there was an error at the beginning of the bundle content

/* Minification failed. Returning unminified contents.

Since there was an error, the server was trying over and over to generate the file instead of instructing the browser to use the cached version. So in addition to not use the browser cache, it was using server resources.

Yepeekai
  • 2,545
  • 29
  • 22