Is there a way to set custom headers on a site collection ?
I'm trying to resolve issues with compatibility mode and an http header is needed
UPDATE FINAL
After going through a lot of MSDN docs and wasting lots of time on this the verdict is: Response Headers CAN NOT BE SET or added on Office 365 (Sharepoint Online, talk about Brand cannibalization)
The initial issue I was having however I was able to fix using the <meta>
tag (which wasn't working initially, and it's quite visible to see why in the code pasted below) by actually making sure that:
<meta http-equiv="X-UA-Compatible" content="IE=EDGE"/>
doesn't have anything above it other than <Doctype and <html
So here's what we had initially (this was used by the front end guys for foundation framework)
<!DOCTYPE html>
<!--[if IE 8]>
<html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]>
<!--> <html class="no-js" lang="en"> <!--<![endif]-->
<body>
<head>
<meta charset="utf-8" />
Here's what it is now:
<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE"/>
And then the IE check tags go between </head> ... <body>
UPDATE:
Within a webpart, using this.Context.Response.Headers.Set("some", "more");
throws a "PlatformNotSupportedException ... This operation requires IIS integrated pipeline mode"
Using this.Context.Response.AddHeader("some", "more");
does not throw the Exception but is not adding any headers to the response.
:(