IE10's index.dat files replaced with a cache database 4/3/2013 5:27:00 PM

Someone mailed me off my old IEInternals blog to ask me about IE10's move from index.dat files to the WebCacheV01.dat database file. They had a number of questions and it occurs to me that this probably isn't written up anywhere else. So, for posterity (and with the caveat that I can't speak for Microsoft):

Q: Why the change? Why are browsing artifacts are still present in other locations?

A: The old index.dat files represented a cross-process memory-mapped index file for the internet cache entries. This index was designed for optimal performance on common computers of the mid-1990s; for instance, the data structures it used were designed to fit in the on-chip cache of a 486 processor. Since then, processors have grown far more powerful, with larger caches, etc. As a consequence, the old cache index code was no longer very efficient (especially for operations that proper databases are good at, like running multi-condition queries). By moving this cache to a proper database, it simplified code, improved performance, and enhanced durability/reliability.

When you say “why are browsing artifacts are still present in other locations,” I can only assume that you’re referring to the cache files themselves? Keep in mind that the new database and old index.dat are simply an index to those files on disk. You may wonder why browsers store the response bodies in files rather than inside the database itself—this is done for both performance and compatibility reasons.

Q: Why is this file loaded when Windows starts even before IE loads?

A: The cache is an integral part of WinINET, a core networking component in Windows. WinINET’s cache isn’t just the browser’s cache—it’s also used by most Metro applications, Windows components, and tens of thousands of other applications that rely on WinINET. That’s why, for instance, when you uninstall IE from Windows, WinINET and its data stores remain on the system. The database is loaded by the cache service in order to handle requests from applications that depend on WinINET. Deleting the database would be very bad from a privacy point of view, because the database tracks which files need to be deleted when you use the Delete Browser History / Clear Cache commands. If you were to obliterate this index, these files would be orphaned and present a privacy risk.

Q: Why is there a delay in writing to the database after the browser closes?

A: I’m not sure what specific “delay in writing to the database” that you’re referring to, but I assume this is simply related to how most databases work—there’s an in-memory representation that is periodically flushed to disk for both performance and hardware-durability reasons (most SSDs have a limited number of write-cycles, for instance).

Q: Why is the extension .DAT instead of .EDB which is used by other Ese databases.

As to why the extension is .DAT, I don’t know, but I assume that this is probably a historical artifact related to the fact that WinINET’s cache indicies have always been named *.dat.

Q: Do IE10 on Win7 and IE10 on Win8 cache data in the same way?
A: I think the answer you’re looking for is “essentially.” The one caveat is that Windows 8’s Enhanced Protected Mode feature uses AppContainers for isolation of content; this feature is an evolution of the Protected Mode feature introduced with Windows Vista.
+ Comment
Mike Appleby Hi, Is it possible to flush, close the webcache and terminate the processes correctly so no information is lost? Thanks, Mike.
doug diehl Am thinking of EXCLUDING THIS from my PC Backup tool since it changes all the time, is unique, and is very large. Can you think of any (common or likely) scenario where you would want a copy of the .dat file?


< Eric's Blog Home


©1998-2024 Eric Lawrence