Internet Explorer frame.frames properties of an object do not retain their values after upgrading to Windows XP Service Pack 2 (SP2)

Article translations Article translations
Article ID: 884697 - View products that this article applies to.
Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
Expand all | Collapse all

On This Page

SYMPTOMS

When you install Microsoft Windows XP Service Pack 2 (SP2), a new object caching feature is also installed. When you compare the values of the two frame.frames properties of an object in Microsoft Internet Explorer, the results may be incorrect, or the values may not be retained.

CAUSE

In Windows XP Service Pack 2, the frames object is now wrapped with a security wrapper. When the new object caching feature is enabled, this security wrapper is applied. Therefore, access to all cached objects is blocked. This may cause the frames object comparison to return false even though the frames are equal.

RESOLUTION

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To resolve this problem, you can use either of the following methods to restore or to replicate the original functionality:
  • You can compare the frames objects by name, as in the following sample code:
    a.name == parent.frames[1].frames.name
  • You can change the registry by using the following registry setting. The following registry setting reverts the object caching to pre-Service Pack 2 behavior. The registry change has to be performed on each client. We do not recommend this method.

    HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER\Software \Microsoft \Internet Explorer\Main\FeatureControl\FEATURE_OBJECT_CACHING Value: IExplore.exe Setting: 0 (Off), 1 (On)


    Note Restart your computer after you modify the value data of this registry key.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to reproduce the problem

  1. Create an HTML page that is named Test1.html. Put the following code in the Test1.html page:
    <html>
    <head>
    <title>Test</title>
    </head>
    
    <frameset id=frset1 rows='33%,33%,33%'>
    <frame name="frame1" title="" src="about:blank" marginheight='0' marginwidth='0' noresize scrolling='No'>
    <frame name="frame2" title="" src="about:blank" marginheight='0' marginwidth='0' noresize scrolling='No'>
    <frame name="frame3" title="" src="test2.html" marginheight='0' marginwidth='0' noresize scrolling='No'>
    </frameset>
    
    </html>
  2. Create a second HTML page that is named Test2.html. Put the following code in the Test2.html page :
    <html>
    <script language="javascript">
    var a;
    function frames()
    {
      
       a = parent.frames[1].frames;
     
       
    }
    function boo()
    {
     
          if (a== parent.frames[1].frames)
             alert("match ");
          else
             alert("no match ");
       
    }
    </script>
    <body onload="frames()">
    <br>
    <input type="button" onclick="boo()" value="Test">
    </body>
    
    </html> 
  3. Put Test1.html and Test2.html in the same folder.
  4. Double-click Test1.html, and then click Test.
  5. On a computer that is running Windows XP Service Pack 2, you may receive the following message:
    no match
    On a computer that is running a version earlier than Windows XP Service Pack 2, you may receive the following message:
    match

REFERENCES

For additional information about Internet Explorer object caching, visit the following Microsoft Web site:
http://technet.microsoft.com/en-us/library/bb457150.aspx

Properties

Article ID: 884697 - Last Review: August 13, 2007 - Revision: 2.2
APPLIES TO
  • Microsoft Windows XP Professional Service Pack 2 (SP2)
  • Microsoft Windows XP Home Edition Service Pack 2 (SP2)
Keywords: 
kbtshoot kbprb KB884697

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com