This project is read-only.

Specifying the Expires Header per bundle

Jun 24, 2013 at 2:22 PM

We have a scenario where we provide a JS script that may be used by an external source, i.e. not from within the application hosting the script file.

We've considered using a CDN, but we want to allow for a custom domain name and SSL, which rules out most CDN solutions.

Effectively we want to use bundling to serve up the JavaScript, but we don't want the cache period to be 1 year, something like 1-2 weeks would be fine, as the file JS does't change very often.

Would it be possible to expose an Expires, (or maybe better CachePeriod) TimeSpan property on the Bundle class, this could be defaulted to 1 year, but updated for bundles that we want to be less.


Jun 24, 2013 at 2:28 PM
Upon better searching (using the correct keywords :-) this appears to be a duplicate of Work Item 21.