Microsoft KB Archive/167840

{|
 * width="100%"|

FIX: Unable to Update Installed Component with Newer Version

 * }

Q167840

-

The information in this article applies to:


 * Microsoft Internet Explorer (Programming) versions 3.0, 3.01, 3.02

-

SYMPTOMS
When you navigate between two pages that refer to different versions of the same component, Internet Explorer 3.x may use the version of the component first loaded, for both pages. While Internet Explorer appears to download the new version of the component, it may continue to use the older version.

CAUSE
In an attempt to optimize back and forth navigation between pages, Internet Explorer 3.x may maintain a most-recently-used memory cache of up to 4 viewed pages. This cache includes all the components contained in those 4 pages. The problem described in this article is a negative side effect of this caching mechanism. When the newer component is installed, DllRegisterServer (exported by the component) is called to register the component. Unfortunately, if Internet Explorer has the older component in memory (in the memory cache), DllRegisterServer is called on the component already in memory, essentially re-registering the old component.

"Q167230 HOWTO: Detecting when IE holds Controls and Pages in Memory"

STATUS
In Internet Explorer 4.0 and later, this 4 page cache is not kept by the browser. ActiveX controls are destroyed when the user navigates away from a web page.

RESOLUTION
In Internet Explorer 3.x, one workaround is to close the browser and revisit the page. Doing this will cause the newer version of the component to display on the page as expected.

If restarting Internet Explorer 3.x is not an option, another workaround may be to assign a new CLASSID to the newer version of the component. This forces IE 3.x to treat the component as an entirely new component not already installed in the system, thereby causing it to download the new version of the component and display it on the page.

Steps to Reproduce Behavior
  Using Internet Explorer 3.x, visit a page that uses Version 1.0 of a component, say Circ3.OCX:         Visit another page (PAGE2.HTM) that uses Version 2.0 of the same component, that is its CODEBASE tag should look something like CODEBASE="http://example.microsoft.com/circ3.cab#Version=2,0,0,0"> Observe as Internet Explorer 3.x attempts to download the .CAB, as specified in the CODEBASE tag. It brings up the digital certificate, prompting the user to install version 2.0 of the component. Click Yes to install the newer version, and although Internet Explorer 3.x appears to download the .CAB to disk, it is unable to do so, because the component is still loaded in memory. (This can be misleading because Internet Explorer 3.x does not notify the user of this failure to download the control; however, if you verify the version of the control in the registry, or in the OCCACHE directory, it still indicates version 1.0.)</li> When the second page is finally loaded, Internet Explorer 3.x continues to use version 1.0 of the component, instead of the specified version 2.0.</li> Restart Internet Explorer and revisit Page2.HTM. Internet Explorer 3.x prompts the user to download version 2.0 of the control again (remember that it was not able to successfully do this in #4 above).</li> Click Yes and the page is finally loaded with the correct version (version 2.0) of the component.</li></ol>