Solved

How to automatically disable document modus IE7

Posted on 2014-07-29
3
300 Views
Last Modified: 2014-07-29
Hello,

We developed websites where customers can find personal financial information. Now in some cases our customers automatically open a website in Internet Explorer in document modus IE7. It is possible that the user changes this setting by himself at his PC. But I prefer to make a server setting in order to prevent websites displaying in IE7 doc modus. Is that possible?

(I think the problem with the document modus only occurs when our clients use our website in intranet environment. I see that there is a setting 'display intranet sites in compatibility view'. So, how can we automatically disable this option at the server?)

Regards,

Arne
0
Comment
Question by:adiemeer
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
duncanb7 earned 500 total points
ID: 40226900
You can use browser detection to detect the user request header which is modified by users on clicking  F12 key in order to  determine what version of document mode users are trying to change, and modified  the page's user-agent  in the header information  before send or response back to user's browser.
For example only,
Users call financial.php to your server and in your finanical.php you have code something like that as follows and the re-send the page to users with or without condition similarly in Example-1 and Example-2
and with your wishing user-agent information for users that will force user to following your rule to view the your-original-finanical.php webpage.

Hope understand your question completely. If not , please point it out.

Duncan
Example-1: detect IE7 document mode and re-send
=========================================
<?php
$curl = curl_init();  //initital a curl call
curl_setopt( $curl, CURLOPT_USERAGENT,       Mozilla....MSIE 10..your default info...."
$ua= $_SERVER['HTTP_USER_AGENT'];  //get the user's user-agent
if (strpos($ua," "MSIE 7.0)>0){
//Detected IE 7  and change user-agent for IE 10 and  re-send it by curl() 
curl_setopt( $curl, CURLOPT_USERAGENT,       Mozilla....MSIE 10..your new info......."
}
curl_setopt( $curl, CURLOPT_URL,            "http://yourdomian/your-original-financial.phg  );
$htm = curl_exec($curl); //re-send the page to users 
?>

Open in new window


Example-2, whatever users' document mode, just resend it to original page.
=========================================
<?php
$curl = curl_init();  //initital a curl call
curl_setopt( $curl, CURLOPT_USERAGENT,       Mozilla....MSIE 10..your default info...."
culr_setopt( $curl, CURLOPT_URL,            "http://yourdomian/your-original-financial.phg  );
$htm = curl_exec($curl); //re-send the page to users 
?>

Open in new window

0
 

Author Closing Comment

by:adiemeer
ID: 40228503
Thank you
0
 
LVL 13

Expert Comment

by:duncanb7
ID: 40228513
Thanks for your points

Have  a nice day

Duncan
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem I downloaded the Microsoft Internet Explorer 9 Beta, today, to give it a test drive and maybe write a review for the site, and it failed miserably and got stuck in a crash restart loop. The error message given is as illustrated below i…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now