<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Photohblog &#124; ..247.. &#187; cache</title>
	<atom:link href="http://abhi247.com/myblog/tag/cache/feed/" rel="self" type="application/rss+xml" />
	<link>http://abhi247.com/myblog</link>
	<description>Point &#38; Shoot</description>
	<lastBuildDate>Fri, 27 Jan 2012 08:22:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Manually solve ‘empty cache after crash’ problem in Firefox</title>
		<link>http://abhi247.com/myblog/2009/06/30/manually-solve-empty-cache-after-crash-problem-in-firefox/</link>
		<comments>http://abhi247.com/myblog/2009/06/30/manually-solve-empty-cache-after-crash-problem-in-firefox/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 17:58:39 +0000</pubDate>
		<dc:creator>Abhishek</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[empty cache on crash]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox bug]]></category>
		<category><![CDATA[firefox cache fix]]></category>
		<category><![CDATA[firefox empty cache]]></category>
		<category><![CDATA[frhed]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://abhi247.com/myblog/?p=23</guid>
		<description><![CDATA[The Background: Imagine that you have 400+ MB of Firefox&#8217;s cache brimming with websites that you visit regularly. &#8230; <a href="http://abhi247.com/myblog/2009/06/30/manually-solve-empty-cache-after-crash-problem-in-firefox/">Read more</a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="Firefox" src="http://www.mozilla.com/img/tignish/firefox/download-background.png" alt="" width="265" height="130" /></p>
<p><strong>The Background:</strong></p>
<p>Imagine that you have 400+ MB of Firefox&#8217;s cache brimming with websites that you visit regularly. If Windows crashes or the computer is not shut down properly while Firefox is still running, you WILL lose that cached data when you start Firefox again. Which basically means that every site you visit now will be downloaded all over again, since the cached files are no longer valid. If your computer has a nasty habit of crashing every now and then, or you run your computer in an environment devoid of a UPS and susceptible to frequent power outages, you will end up wasting a lot of bandwidth. And God help you if you are on a limited data transfer plan.</p>
<p><strong>Why Does This Happen?</strong></p>
<p>When you start Firefox it marks the cache as &#8216;dirty&#8217; and when you close Firefox, the dirty bit is removed. So when Firefox is not properly closed, the cache remains tagged as &#8216;dirty&#8217;. Firefox checks the status of this bit on startup and when it sees the &#8216;dirty&#8217; bit, it invalidates the entire cache and the cache is rebuilt from scratch, beginning from this session.</p>
<p>I have been plagued by this problem for a while now. Searching the Internet brought up vague results and recommendations to install an extension (which I haven&#8217;t been able to get installed till now). Then a few days ago I stumbled upon a post which actually explained the entire concept behind this behaviour. After reading this, I decided to write a tutorial on it.</p>
<p><strong>Let&#8217;s Get Our Hands Dirty:</strong></p>
<ul>
<li><a title="Download Frhed" href="http://sourceforge.net/project/showfiles.php?group_id=236485&amp;package_id=308801&amp;release_id=688790" target="_blank">Frhed</a> is a small, free and functional hex-editor that we will use for this tutorial. Download and install <strong><em>Frhed</em></strong>.</li>
</ul>
<div id="attachment_24" class="wp-caption aligncenter" style="width: 483px"><a href="http://abhi247.com/myblog/wp-content/uploads/2009/06/frhed.jpg"><img class="size-full wp-image-24" title="Frhed - Free Hex Editor" src="http://abhi247.com/myblog/wp-content/uploads/2009/06/frhed.jpg" alt="Download Frhed" width="473" height="209" /></a><p class="wp-caption-text">Download Frhed</p></div>
<ul>
<li> Now we need to locate the folder where Firefox has stored its cache. I am supposing that Windows is installed on the &#8216;C&#8217; drive and that only 1 user-profile is being used in Firefox.</li>
<li>If you are using Windows XP, navigate to-</li>
</ul>
<p><strong><em>C:\Documents and Settings\&lt;UserName&gt;\Local Settings\Mozilla\Firefox\Profiles</em></strong>.</p>
<ul>
<li>On Vista/Windows 7 machines, go to<em><strong>-</strong></em></li>
</ul>
<p><strong><em>C:\Users\&lt;UserName&gt;\Local Settings\Mozilla\Firefox\Profiles</em></strong>.</p>
<ul>
<li>Look for a folder that has the word<strong><em> &#8216;.default&#8217;</em></strong> suffixed to it.</li>
<li>In that folder you will find a directory named<em> <strong>&#8216;cache&#8217;</strong></em>. Open it.</li>
<li>Now look for a file named<strong> <em>_CACHE_MAP_</em></strong> in this folder.</li>
</ul>
<div id="attachment_30" class="wp-caption aligncenter" style="width: 495px"><a href="http://abhi247.com/myblog/wp-content/uploads/2009/06/cache_path.jpg"><img class="size-full wp-image-30" title="cache_path" src="http://abhi247.com/myblog/wp-content/uploads/2009/06/cache_path.jpg" alt="Path to Firefox's cache" width="485" height="167" /></a><p class="wp-caption-text">Path to Firefox&#39;s cache</p></div>
<ul>
<li>Open this file with Frhed. It should look something like this:</li>
</ul>
<p style="text-align: center;">
<div id="attachment_33" class="wp-caption aligncenter" style="width: 310px"><a href="http://abhi247.com/myblog/wp-content/uploads/2009/06/cache_in_frhed.jpg"><img class="wp-image-33" title="cache_in_frhed" src="http://abhi247.com/myblog/wp-content/uploads/2009/06/cache_in_frhed-300x205.jpg" alt="_CACHE_MAP_ in Frhed" width="300" height="205" /></a><p class="wp-caption-text">_CACHE_MAP_ in Frhed</p></div>
<ul>
<li>Now in Frhed, go to the<em><strong> &#8216;Edit-&gt;Go To&#8217;</strong> </em>option. Type<em><strong> 15</strong></em> and press Enter.</li>
<li>Why 15? Because the dirty bit is stored at that position in the <strong><em>_CACHE_MAP_</em></strong> file.</li>
<li>If Firefox is currently running or was not closed properly, the value at this position will be <strong><em>01</em></strong>.</li>
</ul>
<div id="attachment_34" class="wp-caption aligncenter" style="width: 310px"><a href="http://abhi247.com/myblog/wp-content/uploads/2009/06/cache_pos_in_frhed.jpg"><img class="size-medium wp-image-34" title="cache_pos_in_frhed" src="http://abhi247.com/myblog/wp-content/uploads/2009/06/cache_pos_in_frhed-300x205.jpg" alt="The bits to be altered" width="300" height="205" /></a><p class="wp-caption-text">The bits to be altered</p></div>
<ul>
<li>As you can see in the image, the value at this position is <strong><em>01</em></strong>, which indicates that the cache is currently marked as dirty. To change this, simply replace the<em><strong> 01</strong> </em>with<strong> <em>00</em></strong> and save the file.</li>
<li>Now start Firefox and try opening any of the sites you regularly visit. They should open normally without the whole content being downloaded off the server, which is exactly what we wanted. <img src='http://abhi247.com/myblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>To make things even simpler, I&#8217;d suggest that you create a shortcut to the<em> _CACHE_MAP</em>_ file on your desktop so that you don&#8217;t have to go through the maze of folders to reach it again. <img src='http://abhi247.com/myblog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ul>
<p>So there you have it. By investing no more than a couple of minutes every time Firefox is not closed properly, you can save yourself a lot of bandwidth <em>and</em> time. <img src='http://abhi247.com/myblog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://abhi247.com/myblog/2009/06/30/manually-solve-empty-cache-after-crash-problem-in-firefox/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

