Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-16-2013, 12:44 PM   PM User | #1
mjabado
New Coder

 
Join Date: Dec 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
mjabado is an unknown quantity at this point
X-UA-Compatibility with HTTP Header

actually i'm having a problem with a website in IE which is not on intranet and the "always show pages in compatibility mode is not activated" but it still opens in quirks mode sometimes, despite adding

Code:
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
I have red that i can send this compatibility order in an HTTP Header or in htaccess

My problem is that i have searched on how to send an HTTP header and actually found no clue, and btw i'm a php developer just in case this information was necessary.

I would really appreciate if someone could provide me what's needed to add (for both, or for one at least) and how/where to add it, i have been looking for the whole week and it's quiet urgent to find the fix so soon !

Is this way to send it as an HTTP header as a first line in the page is right ?

Code:
<?php
header('X-UA-Compatible: IE=edge');
?>
I really appreciate any help can be provided and i'm thankful in advance
mjabado is offline   Reply With Quote
Old 03-16-2013, 04:29 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,741
Thanks: 4
Thanked 2,465 Times in 2,434 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
That's correct.
So long as its called before any output has occurred, than it will add the header to the headers stack to send.
Now if the browser accepts it is an entirely different thing. It is an extension setting, so there would be no way to force that.
__________________
PHP Code:
header('HTTP/1.1 420 Enhance Your Calm'); 
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Tags
htaccess, http, php

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:40 PM.


Advertisement
Log in to turn off these ads.