Index.dat: Part II – What are they used for?

As I mentioned in Part I, index.dat files are used by various features of IE to keep track of URLs and associated information about URLs.  The two primary consumers of these files are the Temporary Internet Files folder (TIF) and History. 

TIF uses an index.dat file to map URLs to the associated Cache file name.  Developers can use the GetUrlCacheEntryInfoEx() function to perform this lookup. 

History, which I am more familiar with, uses an index.dat file to keep track of which URLs should be displayed in History.  Additionally, it stores other metadata about the url, such as the number of visits.  This information is consumed by many features of IE.  Off-line favorites uses it to keep track of subscription information.  Shortcuts use it to find the Favicon.  Auto-complete uses it to create a list of options to display in the drop-down box.  Link coloring in the HTML rendering engine uses the list to decide how to color any given link on the page.

Furthermore, History actually uses more then one index.dat file.  If you look in the [user profile]\Local Settings\History\History.IE5\ directory, you will see index.dat and some directories of the form MSHist###################.  Those directories also contain index.dat files.  The root-most index.dat file is where general history information is stored.  The ones in the MSHist directories are used to support alternate views of History.  If you open the History Explorer Bar (CTRL+H) and click the View drop down (ALT+W) you will see the various views that IE supports. 

More to follow.

Comments (9)

  1. JD says:

    Are these files deleted when the user uses the control panel to clear TIF or clear History?

    (please don’t channel Raymond and say "try it, and report back’)

  2. typhoon 121 says:

    Why are the all of these files/folders talk relate to IE 5 (History.IE5) on Windows XP when it has IE 6 on it by default. Why does it still refrence a legacy version of IE. why wouldent the folders be ie 6.

  3. jeffdav says:

    JD – Lifetime and Deletion of the files is a future post topic.

    Typhoon – That would make another interesting post topic. Basically for IE 5 they added a lot of functionality and so they put it in a .IE5 directory. Nothing much changed in this area for 5.5 and 6, so the filename was just left alone for legacy and compatibility reasons. The same reason why MSN Explorer 8, 9 and 9.5 all have the executable named MSN6.EXE. 🙂

  4. Continuing the discussion in the previous post, offcourse index.dat is not a secret record of any kind,…

  5. Since a recent digg article and its underlying Wikipedia entry seems a little confused about index.dat,…