Windows 7: Speeding Up Web Browsing with Cache Tweaks

In a previous post, I explored the option of using a RAM disk to speed up web browsing, but found that simple adjustments to the browser’s cache settings made a tremendous difference in responsiveness and stability.  While that previous post explores the details, the purpose here is just to distill the essential steps.

These steps seemed to achieve two things:  they relocated the browser cache, and they enlarged it.  I chose to relocate my caches so that they would not be included on drive C.  I anticipated a couple of benefits from this.  First, when I did make a drive image, so as to preserve a backup of my Windows installation, I preferred to keep the images relatively small by excluding unnecessary material.  Caches were not essential to restore Windows.  Instead, I put them in a separate partition that I called BACKROOM.  My computer had two hard drives.  BACKROOM was not on the same drive as C (PROGRAMS).  Thus, if the hard drive housing partition C failed, it would not take the partition containing my system backup; and there would typically be some speed advantage from allowing two drives to share the load of recovering and working with whatever might be in the cache.  The BACKROOM partition was huge, so I could create very large caches there.

My thinking about the size of the cache was that, hopefully, it would not be used much.  That is, I preferred to have enough RAM to let the browsers store most of what they were using in memory, rather than on disk.  But if they wanted to store stuff on disk, that was still much faster than re-downloading it from some remote server.  Now that I had spun my wheels on using a RAM disk for the cache, it seemed to me that the disk-based cache could be much larger and (except in the case of effective persistent RAM disks) it would also hold its contents during system hibernation.

The steps I took yielded a tremendous improvement.  They were only as good as my sources, however:  I was not an independent expert in this sort of thing.  (The previous post cites those sources.)  Those steps were as follows:

  • Internet Explorer.  Go to Tools > Internet options > Browsing history > Settings > set the amount of disk space to use, and also click on the Move Folder button to relocate.
  • Firefox.  Type about:config into the Firefox address bar and hit Enter.  Search for browser.cache.disk.parent_directory.  Right-click on that entry and choose Modify.  Enter the folder where the cache should be.  For me, that was a newly created folder on the BACKROOM partition, located at X:\Cache\FirefoxCache.  (I used Start > Run > diskmgmt.msc to change drive letters, so that BACKROOM was drive X.)  Next, search in about:config for browser.cache.disk.capacity.  Right-click > Modify > type in the desired value.  Intending to set a cache of 1GiB, I typed in 1073741824.  Then I closed about:config and restarted Firefox.
  • Chrome.  The solution for Chrome was to edit the shortcut used to open the program.  I right-clicked on that Start Menu shortcut and went into Properties.  There, I needed to add certain information to the end of the Target entry.  The resulting line said "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disk-cache-dir="X:\Cache\ChromeCache" --disk-cache-size=1073741824.  I would have to remember not to let that shortcut be overwritten if Chrome got reinstalled or updated and, in the process, supplied a new shortcut.  To aid in that, I renamed the shortcut to be “Chrome (Tweaked).”  I would also have to make sure that I was using the right shortcut, or its contents, if I had batch files or other folders (e.g., Startup) containing a reference to Chrome.
  • Opera.  Opera used an approach like Firefox.  In a blank tab, I typed opera:config in the address bar and hit Enter.  I made a number of changes here.  Some may have been unnecessary; some may have been excessive.  But so far, the results had been great.  Specifically, in the Cache option, I changed Application Cache Quota and SVG Cache Size to 512000 each.  In Disk Cache, I changed Buffer Size and Multimedia Stream Size to 5120, and both Size and Media Cache Size to 10000000.  In User Prefs, I set Cache Directory4 and also Operator Cache Directory4 to X:\Cache\OperaCache.  I also changed the Temporary Download Directory to X:\Cache.  I had to remember to hit the Save button after the changes in each of those subparts of opera:config.  Here, again, I killed and restarted the browser.

Those were the changes that I had made on my primary computer.  Now I repeated them on my secondary computer.  After making the changes, I restarted Firefox, Chrome, and Opera, and loaded them with a few dozen open tabs each.  Then I killed and restarted them.  The results were most impressive in Opera:  it was fast and stable.  Chrome still had a Shockwave Flash crash on restart, and still came up with a Page(s) Unresponsive dialog indicating that it was overburdened.  Firefox functioned, but seemed to be forever reloading its tabs.  While I believed I had some improvement, and was in fact seeing some very impressive functioning in Opera, it appeared that this project was not yet finished.

This entry was posted in Uncategorized and tagged , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s