PRB: File Protocol URLs Do Not Work Correctly with # Fragments (181674)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 4.0

This article was previously published under Q181674

SYMPTOMS

File protocol URLs with # (number sign) fragments do not work correctly in Internet Explorer 4.0x. This is true for URLs that point to HTML and non- HTML files. When navigating to a file URL with a # fragment, one of the following two problems might occur:
  • The page is loaded, but the page is not scrolled to the # fragment.
  • You get the following error message:
    xxx is not accessible
    This folder was moved or removed

STATUS

This is by design.

MORE INFORMATION

The # fragments are used to provide bookmark and parameter information within the URL. For example, you can use "http://host/filename.htm#bookmark" to instruct Internet Explorer 4.0 to load Filename.htm and scroll to "bookmark". This works correctly with the http protocol, but does not work with the file protocol.

This problem only occurs if you enter the file URL in the address bar of Internet Explorer. This problem does not occur if the file URL with the # fragment is used in an anchor tag or when setting the location.href property. However, if the file extension is not .htm or .html, this problem will still occur, even on file URLs in anchor tags.

Steps to Reproduce Behavior

If you have the Internet Client SDK installed in the directory C:\Inetsdk, typing the following in the address bar of IE results in one of the errors listed above:

file:///C:/INetSDK/Help/inet0013.htm#positioning_0503000101000000

However, if you omit the # parameter as follows, it works correctly.

file:///C:/INetSDK/Help/inet0013.htm


Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug kbDHTML kbDSupport kbFAQ kbprb KB181674