Monday, March 01, 2010

Missing .htc files cause a 404 for the whole page

Last night I was helping a friend fix a web page in Internet Explorer 8.0. The problem was quite weird. The page would load and display properly for a moment, but then Internet Explorer would display its "The webpage cannot be found" page.

We found that this behaviour could be stopped by disabling "Binary and script behaviors" in the ActiveX section of security settings, or by disabling "friendly" HTTP error messages (in advanced settings).

The JavaScript debugger could be used by pausing execution and then reloading the page, but this was not helpful. The location where the 404 appeared changed a bit, and in any case, JavaScript didn't seem to do anything to cause a redirect. JavaScript debugging ended up just being a waste of time.

We eventually found that the problem was due to a missing .htc (HTML Components) file.

No comments: