Skip to main content
1 of 2
mikkelbreum
  • 2.5k
  • 5
  • 28
  • 34

WP function/filter for modifying http headers?

Is there a dedicated WP function, action or filter to use when adding/modifying the HTTP headers?

For now I just hook a PHP header() call into the WP 'init' hook like this:

add_action('init', 'add_header_xua');
function add_header_xua(){
    header('X-UA-Compatible: IE=edge,chrome=1');    
}

But is this the correct way to do that?

mikkelbreum
  • 2.5k
  • 5
  • 28
  • 34