We got couple of severe IE performance issues recently. After spend lots of time, we suspect these issues are due to poor quirks mode. We want to change the IE documentation mode to verify this. However, for these scenarios, IE hang/dead with 100% CPU, there is no way to change the documentation mode manually.

 

Using Fiddler and follow custom script, we successfully changed the IE documentation mode automatically without change the html code. And successfully verified that these issues were fixed by using IE 8/9 documentation mode.

 

 

1.            Add follows before the end of OnBeforeResponse into \Program Files\Fiddler2\Scripts\SampleRules.js.

2.            Delete the CustomRules.js file in your \Documents\Fiddler2\Scripts\

3.            Now IE documentation mode changed to what you specified in the highlighted line of code.

 

        if  (oSession.oResponse.headers.ExistsAndContains("Content-Type", "html")){

            //  Remove  any  compression  or  chunking

            oSession.utilDecodeResponse();

            var sBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes);

            //MessageBox.Show("body");

 

            var iStart = 0;

            var iHeadPtr = 0;

            iHeadPtr = sBody.IndexOf("<head", 0, StringComparison.OrdinalIgnoreCase);

          

            if (0 > iHeadPtr)

            {

                return;

            }

          

            iStart = iHeadPtr + 3;

            var iInsertPtr = sBody.IndexOf(">", iStart);

            

            var sToInsert : String = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=8\" >";

 

            sBody = sBody.Insert(iInsertPtr+1, sToInsert);

 

            //  Set  the  response  body

            oSession.utilSetResponseBody(sBody);

       }

 

See you next time,

Wei