Title: Cache-control no-transform
Last modified: August 22, 2016

---

# Cache-control no-transform

 *  Resolved [Peter](https://wordpress.org/support/users/tothpa/)
 * (@tothpa)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/cache-control-no-transform/)
 * HI,
 * I have to add “cache-control: no-transform” value to every response header.
    
   How can I do it with this plugin?
 * Thank you!
    Regards Peter
 * [https://wordpress.org/plugins/add-headers/](https://wordpress.org/plugins/add-headers/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [George Notaras](https://wordpress.org/support/users/gnotaras/)
 * (@gnotaras)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/cache-control-no-transform/#post-5852292)
 * Hello Peter,
 * The format of the `cache-control` header can be filtered with a function. What
   you want can be done with the following:
 *     ```
       function addh_custom_cache_control_format ( $default ) {
           // default format is: public, max-age=%s
           // One %s placeholder must exist. It is replaced by the number of seconds.
           // The following will return: public, max-age=%s, no-transform
           return $default . ', no-transform';
       }
       add_filter( 'addh_cache_control_header_format', 'addh_custom_cache_control_format', 10, 1 );
       ```
   
 * Hope this helps
 * George
 *  Plugin Author [George Notaras](https://wordpress.org/support/users/gnotaras/)
 * (@gnotaras)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/cache-control-no-transform/#post-5852293)
 * Also, you can use the `addh_headers` filter hook to have access to all the generated
   headers or add custom headers. For example:
 *     ```
       function addh_custom_headers ( $headers ) {
           $headers[] = 'X-Custom-Header: 1234';
           return $headers;
       }
       add_filter( 'addh_headers', 'addh_custom_headers', 10, 1 );
       ```
   
 *  Thread Starter [Peter](https://wordpress.org/support/users/tothpa/)
 * (@tothpa)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/cache-control-no-transform/#post-5852363)
 * Hi George!
 * It works fine!
    Thank you so much!!!
 * Bests Peter

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cache-control no-transform’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/add-headers.svg)
 * [Add Headers](https://wordpress.org/plugins/add-headers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/add-headers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/add-headers/)
 * [Active Topics](https://wordpress.org/support/plugin/add-headers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/add-headers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/add-headers/reviews/)

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)

 * 3 replies
 * 2 participants
 * Last reply from: [Peter](https://wordpress.org/support/users/tothpa/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/cache-control-no-transform/#post-5852363)
 * Status: resolved