Whenever my Firefox profile gets corrupted, it's hard to recover, because the profile folder is a complete mess and hard for mortals to understand. Let's see what file formats are used:

  • XUL.mfl - some binary format I can't figure out
  • bookmarks.html - text, HTML (why HTML and not XML or plain text? historical reasons I suppose)
  • cert8.db, key3.db, secmod.db - Berkeley DB
  • compatibility.ini, components.ini, defaults.ini - text, Windows INI format
  • compreg.dat - text, resembles Windows INI but isn't
  • cookies.txt - text, tab separated
  • downloads.rdf, localstore.rdf, mimeTypes.rdf, search.rdf - text, XML, RDF (note that mimeTypes has a capital letter, unlike all the other filenames)
  • formhistory.dat, history.dat - text, resembles XML but isn't (note that these .dat files share the same extension compreg.dat but uses a different format); it's apparently called the Mork format
  • hostperm.1 - text, tab separated (note that this is the same format as cookies.txt but uses a different extension)
  • prefs.js - text, javascript
  • signons.txt - text, multiline, dot separated (note that this has the same extension as cookies.txt but a completely different file format)
  • xpti.dat - text, comma separated (note that this has the same extension as other files but yet a different format)

Not only is the profile folder a complete mess, it's not at all clear which files need to be saved (because they have user data like bookmarks and history) and which ones can be wiped out (because they have installation specific data like an extension list).

To all software developers: make it simple, please. You shouldn't need 11 different file formats to store user data. Use consistent and meaningful filenames. Use consistent extensions. Use the simplest file format that works. These are the same issues that come up when coding.

0 comments: