Search code examples
coldfusioncoldfusion-8

ColdFusion - Leverage browser caching


Is there anyway to leverage browser caching via ColdFusion or does it have to be done at server level (IIS)?

I'm looking to cache images, CSS and JS files.

I have seen Leverage browser caching - if it's not possible in CF, how do I go about adding images/CSS/JS files to that solution?

Thanks,

JJ


Solution

  • CF, normally, isn't serving images, CSS and JS files. You would want to do this via your web server instead. For the files that CF does serve, you can use cfheader to return an expires values in the future. See the core docs on cfheader for an example.