Solved

How to automatically disable document modus IE7

Posted on 2014-07-29
3
311 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IE 11 + long running scripts 3 98
Enforce Chrome to open certain links in IE 6 44
Internet Explorer question 6 37
send to option in chrome 11 40
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
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…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

730 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