<?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>AskApache &#187; Javascript</title>
	<atom:link href="http://www.askapache.com/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com</link>
	<description>Advanced Web Development</description>
	<lastBuildDate>Thu, 19 Nov 2009 12:21:49 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Firefox Add-ons for Web Developers</title>
		<link>http://www.askapache.com/firefox/best-firefox-addons-webdev.html</link>
		<comments>http://www.askapache.com/firefox/best-firefox-addons-webdev.html#comments</comments>
		<pubDate>Mon, 19 Oct 2009 00:14:07 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Making Money]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[askapache]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Firefox Addons]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[YSlow]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3301</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/firefox/best-firefox-addons-webdev.html" class="IFL"><img src="/wp-content/uploads/2009/10/askapache-firefox-cache-116x102.png" alt="askapache favorite addons" title="askapache favorite addons" width="116" height="102" /></a><a href="https://addons.mozilla.org/en-US/firefox/collection/advanced-webdevelopment">Advanced Web Development by AskApache</a> is a <dfn title="Collections are groups of related add-ons assembled for easy sharing">Firefox Collection</dfn> I created since I'm always trying new Addons out and using multiple computers and I wanted a quick and easy way to install my favorite's and keep a running list.  Firebug, YSlow, LastPass, and Web Developer are the only ones I always use regularly.<br /><br />I like the idea of the last.fm but it's not as powerful as the site, which is awesome.  <em>Lately listening to <a href="http://www.last.fm/listen/artist/Kings%2Bof%2BLeon/similarartists">Kings of Leon Radio</a>...</em><br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="https://addons.mozilla.org/en-US/firefox/collection/advanced-webdevelopment"><img src="https://addons.mozilla.org/en-US/firefox/images/collection_icon/27412/1253649941" /></a><a href="https://addons.mozilla.org/en-US/firefox/collection/advanced-webdevelopment">Advanced Web Development by AskApache</a> is a <dfn title="Collections are groups of related add-ons assembled for easy sharing">Firefox Collection</dfn> I created for myself to make finding and installing my favorite Firefox Add-ons simple and easy.</p>
<h2>My Setup</h2>
<p><img class="IFL" src="/wp-content/uploads/2009/10/askapache-firefox-cache.png" alt="askapache favorite addons" title="askapache favorite addons" width="283" height="250" />As this screenshot shows, I only use a handful of add-ons at a time.  These buttons allow me to clear the DNS/Cookies/Cache for whichever site I&#8217;m on when I click it.  Very very helpful for me as a web designer.  The 4th button there is just a restart button.  Other than those, Firebug, YSlow, LastPass, and Web Developer are the only ones I always use regularly.</p>
<p>I like the idea of the last.fm but it&#8217;s not as powerful as the site, which is awesome.  Lately I&#8217;ve been listening to <a href="http://www.last.fm/listen/artist/Kings%2Bof%2BLeon/similarartists">Kings of Leon Radio</a>&#8230; <br class="C" /></p>
<h2>Slow Firefox</h2>
<p><strong>The more add-ons you have</strong>, disabled or not, the slower Firefox is. (<em>unless you are running your profile folder in TMPFS</em>).   Also, bookmarks and settings like that have a performance hit.  I have been using Firefox since it launched way back when, and I have always kept my bookmarks when moving to new machines and new installations..  So with over 5 thousand bookmarks I finally did some debugging and discovered that was a huge cause of Firefox acting slow.  Now I am trying to migrate them all over to Google&#8217;s Gmarks, which knowing Google will be awesome eventually.</p>
<h2>Multiple Firefox Installations, Sorta</h2>
<p>The solution to all these problems is to use <strong>separate Firefox profiles</strong> which use separate folders to store your profile-specific extensions and settings.  So I have profiles with upwards of 40 Addons installed and enabled, and another profile that is built for speed&#8230; It&#8217;s very very slow to be running Firebug and have multiple tabs open..  You can use the profilemanager to load them specific profiles from the command line.  I personally use separate icons on my Windows Quick Launch that I just modified the shortcut pointing to firefox to also have the profile commandline.   Note also that you can have multiple profiles open and running simultaneously.. This lets you do some crazy networking and other random hacks like having many Firefox instances running each of which is configured to use a separate SOCKS Proxy or network interface, so you can really open up those pipes for some intense txrx.</p>
<p>You can do some very powerful things with Firefox that most people are unaware of, if you are interested start with these:</p>
<ul>
<li><a href="https://developer.mozilla.org/en/Setting_up_extension_development_environment">Setting up an extension development environment</a></li>
<li><a href="https://developer.mozilla.org/en/Command_Line_Options">Firefox Command Line Options</a></li>
</ul>
<hr class="C" />
<h3>About This Collection</h3>
<p>Web Development Add-ons for Advanced Web Developers.  I personally use these to work on Sites, Servers, WordPress, Javascript, PHP, CSS, XHTML, validation, page-loading, SEO, optimizing, and much more.  <a href="https://addons.mozilla.org/en-US/firefox/users/login?to=en-US%2Ffirefox%2Fcollection%2Fadvanced-webdevelopment%3Fadvancedsearch%3D1%26show%3D100">Add this collection</a>.</p>
<p><strong>Created by:</strong><a href="https://addons.mozilla.org/en-US/firefox/user/145961">AskApache</a></p>
<p><strong>Updated:</strong>September 22, 2009 </p>
<h3>Share this Collection</h3>
<ul>
<li class="digg"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=digg">Digg this!</a></li>
<li class="facebook"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=facebook">Post to Facebook</a></li>
<li class="delicious"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=delicious">Add to Delicious</a></li>
<li class="myspace"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=myspace">Post to MySpace</a></li>
<li class="friendfeed"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=friendfeed">Share on FriendFeed</a></li>
<li class="twitter"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=twitter">Post to Twitter</a></li>
</ul>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13316?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">History Tree</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13316/1254409345" alt="" height="32" width="32" class="IFL" />Find any page you have visited quickly and easily. Shows your browsing history as a tree of tabs, with thumbnail screenshots of the web-pages in every tab you have opened. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4882?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Scope</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Preview and navigate tab contents through popup. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1480?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Control</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Take control of your tabs!  Purposely lightweight extension with the following features&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5000?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ShareThis</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5000/1248389010" alt="" height="32" width="32" class="IFL" />ShareThis makes sharing any online content quick and easy. The ShareThis plugin allows you to share to any contact via email, text message, Facebook, Twitter and more.  You can also store your shares for later to reshare with the ShareThis ShareBox. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12377?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FirePalette</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12377/1244736178" alt="" height="32" width="32" class="IFL" />Adds a color picker to Firebug&#8217;s CSS panel. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13000?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab History Menu</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13000/1252809752" alt="" height="32" width="32" class="IFL" />When click on the selected tab, a history menu corresponding to it will display. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/8426?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SyncPlaces</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/8426/1252087590" alt="" height="32" width="32" class="IFL" />Synchronizes your bookmarks, passwords and password exceptions between browsers. Uses your own (or third party) web or ftp server so you have complete control and privacy. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10704?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">CSS Usage</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10704/1255464704" alt="" height="32" width="32" class="IFL" />Firebug extension to view which CSS rules are actually used. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9641?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Inline Code Finder for Firebug</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9641/1246025189" alt="" height="32" width="32" class="IFL" />Inline Code Finder is an add-on to Firebug, to be able to find HTML elements<br class="C" /></p>
<blockquote class="publisher-comment"><p>Provides some additional capabilities to firebug to find inline code as opposed to external files.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4723?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Save Complete</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Saves a webpage completely, providing a better alternative to the flawed built-in save functionality of Firefox. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Another of my personal favorites, modifies the &#8220;Save complete page&#8221; option of firefox to truly be more complete, I don&#8217;t understand why firefox doesn&#8217;t already do this.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10615?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireDownload</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10615/1249999245" alt="" height="32" width="32" class="IFL" />The FireDownload extension for Firefox and Wyzo lets you manage and accelerate your web downloads up to 10x faster! With FireDownload, download acceleration is seamlessly displayed within the downloads window. Try the ultimate download accelerator! <br class="C" /></p>
<blockquote class="publisher-comment"><p>Pretty nice and unobtrusive download enhancer.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13255?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Xmarks BYOS Edition</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13255/1248393038" alt="" height="32" width="32" class="IFL" />Bookmark Sync &#8220;Bring Your Own Server&#8221; Edition (BYOS). For expert users who wish to sync their bookmarks and passwords using their own FTP or WebDAV server. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13128?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FormBug</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />An extension to Firebug to make dealing with forms easier <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13135?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Widerbug</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13135/1247888469" alt="" height="32" width="32" class="IFL" />Firebug Evolved. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11588?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SyntaxHighlighter</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />a syntax highlighter, based on SyntaxHighlighter(http://code.google.com/p/syntaxhighlighter/), support lots of program languages. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds syntax highlighting, somewhat intensive.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2318?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Total Validator</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2318/1252747670" alt="" height="32" width="32" class="IFL" />Perform multiple validations and take screen shots in one go. This 5-in-1 validator works with external, internal, or local web pages using the Total Validator service or local copy of the desktop tool&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/115?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ReloadEvery</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/115/1250716156" alt="" height="32" width="32" class="IFL" />Reloads web pages every so many seconds or minutes. The function is accessible via the context menu (menu you get when you right click on a web page) or via a drop down menu on the reload button &#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Love this plugin, replaces the reload button with a look-alike button with a drop-down menu that lets you enable automatic reloading of a tab (or all tabs) and set the number of seconds between reloads.  I&#8217;ve found it very useful for checking cookie behaviour and cache setups, its also nice if you want to keep checking a page for updates.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1985?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Window Resizer</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Resize your browser to various standard resolution sizes&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Quickly resize your window to the common sizes to see what a site looks like for users with that resolution.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4415?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Font Finder</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Get all CSS styles of selected text in Firefox / Thunderbird&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Locate the fonts that are in use on a webpage.  Small and unobtrusive.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12632?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireQuery</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12632/1248402877" alt="" height="32" width="32" class="IFL" />Firebug enhancements for jQuery (requires Firebug 1.3+) <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds jquery support, I usually keep disabled even though I personally use jquery for web development.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5362?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Alexa Sparky</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5362/1255562428" alt="" height="32" width="32" class="IFL" />Alexa Internet&#8217;s official add-on for Firefox!  Get Alexa data in your status bar. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Shows the alexa rank of a site, I like it but it does make new HTTP requests for each page, so I disable it alot for privacy or speed.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5392?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Dust-Me Selectors</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5392/1246551563" alt="" height="32" width="32" class="IFL" />Finds unused CSS selectors. <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of the newer add-ons I&#8217;ve been using.  Lets you find which CSS rules are actually in use on a page, thus helping you to minimize and streamline CSS.  Very cool but it is a little resource intensive so by default I keep it disabled.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11249?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ToggleUseDocColors</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Toggles Tools-&gt;Options-&gt;Content-&gt;Colors:Allow pages to choose their own colors&#8230; option with a single keystroke (Ctrl+M) <br class="C" /></p>
<blockquote class="publisher-comment"><p>Use the documents colors or other.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3606?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FoxTor</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />FoxTor: Anonymous Web Browsing using the encrypted TOR network&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10434?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bing</a></h4>
<p> <img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10434/1247527217" alt="" height="32" width="32" class="IFL" />This is the only officially supported Bing add-on, provided by the Bing team in Microsoft. Bing is a search engine that finds and organizes the answers you need so you can make faster, more informed decisions. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9640?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Inline Code Finder</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9640/1245858044" alt="" height="32" width="32" class="IFL" />Inline Code Finder is a tool to traverse through all elements in a web page, and when it finds a HTML element with any of these, it will highlight them: * Inline JavaScript events * Inline style * javascript: links <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2648?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">MM3-ProxySwitch</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2648/1233685187" alt="" height="32" width="32" class="IFL" />In the Firefox Browser (and other Mozilla programs) you can per default configure only the setting for one internet connection. With the MM3-ProxySwitch you can manage different configurations and simply switch over between these. <br class="C" /></p>
<blockquote class="publisher-comment"><p>If like me you often connect to websites by proxying firefox through SSH Tunnels, then you can use this MM3-ProxySwitch add-on to run 3 different instances of firefox (by using multiple firefox profiles) that EACH use a different Proxy.  This is useful if you want to MAX out your download speed by downloading using multiple tunnels to do the work. </p>
<p>            Also useful for just plain multiple proxy configurations, very easy, and super extremely unobtrusive and low-resource intensive.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6683?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Firecookie</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6683/1251484013" alt="" height="32" width="32" class="IFL" />Firecookie is an extension for Firebug that makes possible to view and manage cookies in your browser <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of my personal favorites, adds a tab to firebug that lets you view live cookies being set, deleted, and updated, and lets you edit, and delete cookies of a page LIVE.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9780?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">RESTClient</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9780/1250817670" alt="" height="32" width="32" class="IFL" />RESTClient is a firefox extension use to visit and test RESTful/WebDav services. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5403?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Java Console 6.0.02</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5403/1189002765" alt="" height="32" width="32" class="IFL" />Java Console Extension for Java SE 1.6.0_02 (version 6 update 2). <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2325?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">RSS Ticker</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />RSS Ticker loads your Live Bookmarks and scrolls their entries across your screen while you surf. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Amazingly awesome add-on that scrolls rss feeds across a small area, helpful to keep track of various feeds and your own sites feeds.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6535?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Sidebar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6535/1244499111" alt="" height="32" width="32" class="IFL" />Displays previews of your tabs in your sidebar. <br class="C" /></p>
<blockquote class="publisher-comment"><p>I like this one more than the tab preview add-ons, lets me find a tab quickly but only when I want by opening the sidebar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12065?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">CryptoFox</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12065/1255638751" alt="" height="32" width="32" class="IFL" />CryptoFox is an encryption/decryption tool for Mozilla Firefox, with dictionary attack support for cracking MD5 passwords. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9027?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bookmark Current Tab Set</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds options to quickly bookmark all tabs in a window and store them in a bookmark folder that is given the date (and optionally the time) as its name. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3362?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Update Scanner</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3362/1252360045" alt="" height="32" width="32" class="IFL" />Monitors web pages for updates. Useful for websites that don&#8217;t provide Atom or RSS feeds. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/139?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Image Zoom</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/139/1231445959" alt="" height="32" width="32" class="IFL" />Adds zoom functionality for images&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Simple image zooming functionality.  Small and useful add-on.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3780?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FaviconizeTab</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3780/1218612666" alt="" height="32" width="32" class="IFL" />This extension adds a new &#8220;FaviconizeTab&#8221; option to the context menu of the tab&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Nice to Faviconize your most-often-used sites</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2489?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">CacheViewer</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />This extenion is GUI Front-end of &#8220;about:cache&#8221;&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Just a shortcut to the about:cache area.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6366?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireGestures</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6366/1254150116" alt="" height="32" width="32" class="IFL" />A customizable mouse gestures extension which enables you to execute various commands and user scripts with five types of gestures. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7189?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Firebug Net History Panel Overlay</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds history functionality to firebug net panel. Requires Firebug 1.2.0b4 or 1.2.0b6 For Firebug versions 1.1.* please use Net Panel Add-on Version 0.2.1 <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3880?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Add Bookmark Here ²</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3880/1253393237" alt="" height="32" width="32" class="IFL" />Add a menuitem &#8220;Add Bookmark Here&#8230;&#8221; to Bookmarks&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5914?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">DNS Cache</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5914/1246397200" alt="" height="32" width="32" class="IFL" />Allows you to disable and enable the DNS Cache of Firefox <br class="C" /></p>
<blockquote class="publisher-comment"><p>The final caching add-on that I absolutely LOVE.  Lets you add anywhere on your toolbar to clear the DNS cache of firefox.  I have  this, clear cache, and clear cookies next to each other on the far left of my bookmarks toolbar, I use them ALOT.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7907?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Manage Folders</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/7907/1248060550" alt="" height="32" width="32" class="IFL" />Places a &#8220;Manage Folder&#8221; item on the context menu of bookmark folders, which opens the &#8220;Places Organizer&#8221; expanded to that folder. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2214?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">View Dependencies</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />View Dependencies adds a tab to the Page Info window, in which it lists all the files which were loaded to show the current page. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2275?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Torbutton</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2275/1249863832" alt="" height="32" width="32" class="IFL" />Torbutton provides a button to securely and easily enable or disable the browser&#8217;s use of Tor. It is currently the only addon that will safely manage your Tor browsing to prevent IP address leakage, cookie leakage, and general privacy attacks. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Quick way to switch firefox to use the TOR network (I recommend the free vidalia suite) which is useful for web developers that rely on an IP address in certain programming and setups.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5447?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Kit</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5447/1249227762" alt="" height="32" width="32" class="IFL" />Tab grouping, vertical tab tree, multi-rows, and various tweaks for power users. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3559?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">QuickRestart</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3559/1241624360" alt="" height="32" width="32" class="IFL" />Ever needed to restart Firefox after enabling or disabling an extension, switching to a new theme, or modifying configuration files (such as userChrome.css or user.js)? This simple extension adds a &#8220;Restart Firefox&#8221; item to the &#8220;File&#8221; menu. You can also use the Ctrl+Alt+R keyboard shortcut, or the included toolbar button. <br class="C" /></p>
<blockquote class="publisher-comment"><p>A button you can place anywhere that restarts the browser just like you do after updating add-ons.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1759?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Organize Status Bar</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />This extension will enable you to organize your status bar icons.  You can now rearrange or remove any item (icon or text) in the Firefox status bar.  If your status bar is full and cluttered like mine was, give this a try. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you rearrange the items on the status bar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/722?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">NoScript</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/722/1255474235" alt="" height="32" width="32" class="IFL" />The best security you can get in a web browser! Allow active content to run only from sites you trust, and protect yourself against XSS and Clickjacking attacks. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2109?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FEBE</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2109/1255569901" alt="" height="32" width="32" class="IFL" />FEBE (Firefox Environment Backup Extension) allows you to quickly and easily backup your Firefox extensions.  In fact, it goes beyond just backing up &#8212; It will actually rebuild your extensions individually into installable .xpi files.  Now you can easily synchronize your office and home browsers. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very helpful and well-designed add-on that lets you backup your entire firefox, or individual add-ons, or both!</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10897?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Check Places</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10897/1255544495" alt="" height="32" width="32" class="IFL" />Checks your bookmarks are valid and the pages still exist. Also checks for duplicates and for empty folders and can restore missing favicons. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1027?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">All-in-One Sidebar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1027/1248433103" alt="" height="32" width="32" class="IFL" />All-in-One Sidebar (AiOS) is an award-winning sidebar control, inspired by Opera&#8217;s. It lets you quickly switch between sidebar panels, view dialog windows such as downloads, extensions, and more in the sidebar, or view source or websites in the sidebar. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2888?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">GMarks</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />GMarks helps you sync &#038; manage your bookmarks with Google Bookmarks&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11950?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Add-on Collector</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/11950/1252025520" alt="" height="32" width="32" class="IFL" />There&#8217;s a new way to manage and find favorite add-ons. Comment, share, and sync collections, all from your browser. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you get updates and makes it very easy to browse a collection such as this one.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2144?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Advanced Dork:</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2144/1249684650" alt="" height="32" width="32" class="IFL" />Advanced Dork: gives quick access to Google&#8217;s Advanced Operators directly from the context menu&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very unobtrusively makes the advanced google search operators available.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2032?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Yahoo! Toolbar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2032/1253720246" alt="" height="32" width="32" class="IFL" />Use Yahoo! and the web faster, safer, and easier with new mail notification, search suggestions, online bookmarks, free spyware scanning, and more&#8230; Save time with the new Yahoo! Toolbar 2.0, now in beta at toolbar.yahoo.com/beta. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3102?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Email This!</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3102/1253158256" alt="" height="32" width="32" class="IFL" />Email This! will send your recipient the link, title, &#038; highlighted text of the page you are viewing using GMail, Google Apps GMail, Yahoo, and Stand-Alone Mail Clients like Outlook Express, Thunderbird, &#038; More! If you hate toolbar buttons don’t fret because I&#8217;ve included a right-click pop-up menu and access keys! <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2062?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab To Window</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2062/1244572621" alt="" height="32" width="32" class="IFL" />Open a tab in a new window&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>I have wanted this type of functionality for soo long.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2323?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Cache View</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Cache View is a Firefox extension that displays Google&#8217;s Cache, Coral&#8217;s Cache, and Wayback Machine&#8217;s Cache cache of an open tab or selected link via a right-click or the Tools menu. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Useful to notice how often a page on your site is crawled and cached by these engines.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6984?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Lazarus: Form Recovery</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6984/1252590349" alt="" height="32" width="32" class="IFL" />Never lose anything you type into a web form again! Lazarus securely auto-saves all forms as you type, so after a crash, server timeout, or whatever, you can go back to the form, right click, &#8220;recover form&#8221;, and breathe a sigh of relief. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Saves your form data securely as you enter it, and provides a way to recover that form data if your firefox crashes (more likely windows crashes) and that way you won&#8217;t lose anything you already entered.  This will slow down firefox alot though.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6132?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Preview</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Preview tab contents on mouseover <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6937?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Multirow Bookmarks Toolbar</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Multi Row Bookmarks Toolbar.<br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2517?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Googlepedia</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Shows you a relevant Wikipedia article along with your search results. Clicking links in the article will trigger new Google searches, making it a very useful research tool&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds wikipedia results right next to google results, very helpful to keep an eye on what is authoritative, and often get the best information fast.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1237?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">QuickJava</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Allows quick enable and disable of Java and Javascript from&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3082?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Undo Closed Tabs Button</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3082/1244495823" alt="" height="32" width="32" class="IFL" />Tired of going to History -&gt; Recently Closed Tabs just to undo a closed tab? Then this extension is for you!  This extension allows you to undo closed tabs via a toolbar and/or tab bar button or the right-click context menu. <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of my personal favorites, adds back the most recently closed tab, very helpful.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10618?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Faviconiac Search Engines</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10618/1247849922" alt="" height="32" width="32" class="IFL" />Adds PNG favicons to some search engines and web directories, such as Google, Yahoo, Bing, Ask, Altavista, Wikipedia, AOL, Dmoz, Alexa, del.icio.us and others. <br class="C" /></p>
<blockquote class="publisher-comment"><p>This is helpful to get a better feel for search engine results by adding their sites favicon to the search results page, is somewhat HTTP Request intensive however.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3928?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bookmark This Page Plus</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3928/1247125860" alt="" height="32" width="32" class="IFL" />Adds a menu item in each sub folder of the bookmarks menu to bookmark the current page. Just as seen in the Opera browser. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1595?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Remove Cookie(s) for Site</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1595/1214859152" alt="" height="32" width="32" class="IFL" />A very simple extension to remove all the cookies of currently opened site. It adds an option to the Right Click menu of the page, and a toolbar button to perform this operation. It displays the status of operation in the status bar. <br class="C" /></p>
<blockquote class="publisher-comment"><p>This is invaluable, it removes all the cookies from whichever domain you are currently viewing.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/967?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Modify Headers</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Add, modify and filter http request headers.  You can modify the user agent string, add headers to spoof a mobile request (e.g. x-up-calling-line-id) and much more.  Take a look at the help tab of the Modify Headers window&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Pretty awesome, lets you modify the HTTP Headers your browser is sending, useful to check accessibility, server settings, language settings, etc.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2625?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">OPML Support</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />OPML Support adds OPML import/export functionality to the Firefox Bookmarks manager. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6647?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">HttpFox</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />An HTTP analyzer addon for Firefox <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/8879?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FoxTab</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/8879/1249840764" alt="" height="32" width="32" class="IFL" />3D in your browser!  FoxTab brings innovative 3D functionality to your Firefox. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Super awesome cool.  If your machine is fast this is a really helpful add-on.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/655?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">View Source Chart</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/655/1246405984" alt="" height="32" width="32" class="IFL" />View Source In Color-Coded Chart Get V2.8 w/ a brand new feature from jennifermadden.com <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of my long-time, all-time favorites that lets you view the source code of a website, but in a color-coded and formatted view.  Very nice and helpful for (X)HTML developers.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4072?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Smart Bookmarks Bar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/4072/1234555016" alt="" height="32" width="32" class="IFL" />Not enough place on your bookmarks bar ?&#8230; Smart Bookmarks Bar extension comes right here by hiding bookmarks names and only showing icons. Bookmark names will be displayed on mouse over. <br class="C" /></p>
<blockquote class="publisher-comment"><p>For those who frequently use the bookmarks in the firefox bookmarks toolbar, this is a great way to show more in a cleaner way.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1433?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Extended Statusbar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1433/1246438548" alt="" height="32" width="32" class="IFL" />A Statusbar with speed, percentage, time and loaded size (similar to Opera&#8217;s one) <br class="C" /></p>
<blockquote class="publisher-comment"><p>Provides much more information unobtrusively on your statusbar, very cool!</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10300?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Email Yourself!</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10300/1253228434" alt="" height="32" width="32" class="IFL" />Email Yourself! allows you to email yourself the link, title, and a selected summary of the webpage you are viewing using GMail. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/125?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SwitchProxy Tool</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />SwitchProxy lets you manage and switch between multiple proxy configurations&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2499?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">LiveClick</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds feed reading, notifications, favicons, and other enhancements to Live Bookmarks. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7314?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Places&#8217; Tooltips</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />This addon enhances all the tooltips in Firefox. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11173?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Multi Smart Search</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />&#8220;Multi smart search&#8221; displays a new context menu including all the installed search engine. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9275?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SortPlaces</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9275/1252087512" alt="" height="32" width="32" class="IFL" />Sorts your bookmarks in a variety of ways. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/433?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Flashblock</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/433/1247913103" alt="" height="32" width="32" class="IFL" />Never be annoyed by a Flash animation again! Blocks Flash so it won&#8217;t get in your way, but if you want to see it, just click on&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you block flash for all/specific websites/domains, which is pretty nice capability to test both your sites for non-flash viewers, and speeds up firefox.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6249?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Google Toolbar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6249/1237314369" alt="" height="32" width="32" class="IFL" />Take the power of Google with you anywhere on the Web <br class="C" /></p>
<blockquote class="publisher-comment"><p>A great add-on that lets you use hundreds of google tricks and tools.  Very helpful but also makes a lot of background HTTP requests so privacy-conscious or speed-freaks will want it disabled.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6622?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">DOM Inspector</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />DOM Inspector is a tool that can be used to inspect and edit the live DOM of any web document or XUL application. The DOM hierarchy can be navigated using a two-paned window that allows for a variety of different views on the document and all nodes within. Note:  This add-on depends on binary changes to Firefox, and will not work with Firefox 2. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Way to inspect the DOM of a page, useful for web developers.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6459?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Stay-Open Menu</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6459/1250004873" alt="" height="32" width="32" class="IFL" />Enables multiple selections from Bookmarks Menu,  History Menu, or Smart Location Bar (awesomebar)  dropdown list, without reopening menu or using sidebar. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/710?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Menu Editor</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Customize application menus: Rearrange or remove menuitems from the main context menu (right-click menu) and main menubar (File Edit View etc.) <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4838?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Multiple Tab Handler</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/4838/1251873082" alt="" height="32" width="32" class="IFL" />Provides feature to close multiple tabs. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1815?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Console²</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1815/1246698544" alt="" height="32" width="32" class="IFL" />Console² (pronounced Console Squared or Console Two) replaces the JavaScript Console with what could be the next generation Error Console. From v0.5 includes the Console Filter extension previously available separately from the Console² website. <br class="C" /></p>
<blockquote class="publisher-comment"><p>An advanced java script console.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6271?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bookmark Previews</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Bookmark Previews adds an album view and thumbnail view to the bookmarks manager. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Now this one is what I call genius.  Lets you view previews of your bookmarks!  Great if like me you have over a thousand bookmarks.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/8542?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">LastPass Password Manager</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/8542/1252161868" alt="" height="32" width="32" class="IFL" />LastPass is a free online password manager and Form Filler that makes your web browsing easier and more secure.   LastPass supports IE and Firefox as Plugins (Opera, Safari, Chrome, iPhone, Opera Mini via Bookmarklets), allows you to import from every major password storage vendor and export too, captures passwords that other managers won&#8217;t including many AJAX forms, and allows you to make strong passwords easily.  Your sensitive data is encrypted _locally_ before upload so even LastPass cannot get access to it.  One Time Passwords &#038; Screen Keyboard help protect your master password. <br class="C" /></p>
<blockquote class="publisher-comment"><p>What can I say, this add-on is in my top 10 for sure, and I recommend it to all my friends and even my family.  Lets me create very secure passwords for sites that I don&#8217;t have to remember because lastpass remembers them for me, and stores them encrypted on both a usb medium I keep, and on their servers.  So when I use someone elses computer or reinstall firefox, I have all my usernames and passwords, and its just sooooooooooooooooo useful.  Get this add-on, it truly is a secure way to only have to remember 1 password from now on, thus LastPass.  The last password you need.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1956?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tabs Open Relative</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1956/1211284492" alt="" height="32" width="32" class="IFL" />Tabs Open Relative makes all new tabs open to the right of the current tab, rather than at the far right of the tab bar (optionally this only applies to links). <br class="C" /></p>
<blockquote class="publisher-comment"><p>This stops that annoying default of opening tabs wayy on the right.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10909?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Coral IE Tab</a></h4>
<p> <img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10909/1255054707" alt="" height="32" width="32" class="IFL" />An enhanced version of IE Tab which enables you to use the embedded IE engine within tabs of Mozilla Firefox. It supports Adblock Plus in IE, and can sync cookies between IE and Firefox. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/966?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tamper Data</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Use tamperdata to view and modify HTTP/HTTPS headers and post parameters&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Useful for checking form validation and security, lets you tamper data! lol</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5369?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">YSlow</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5369/1253220367" alt="" height="32" width="32" class="IFL" />YSlow analyzes web pages and why they&#8217;re slow based on Yahoo!&#8217;s rules for high performance web sites. YSlow uses Yahoo!&#8217;s Smush.it service, which is subject to Smush.it Terms of Use: http://info.yahoo.com/legal/us/yahoo/smush_it/smush_it-4378.html <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of the top 3 most important and helpful add-ons for firefox.  Web Developers who don&#8217;t use this one are simply irresponsible.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/539?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">MeasureIt</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Draw out a ruler to get the pixel width and height of any elements on a&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/271?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ColorZilla</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/271/1234546689" alt="" height="32" width="32" class="IFL" />Advanced Eyedropper, ColorPicker, Page Zoomer and other colorful goodies&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>A must-have add-on for anyone using CSS or developing websites, very amazing, highly capable add-on.  The one issue is that is is somewhat of a resource-hog.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/748?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Greasemonkey</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/748/1253968926" alt="" height="32" width="32" class="IFL" />Allows you to customize the way a webpage displays using small bits of JavaScript. &#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you use user-contributed javascripts (or your own of course) that modifies the behavior and/or appearance of many different websites.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/684?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireFTP</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/684/1254121244" alt="" height="32" width="32" class="IFL" />FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7943?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Pixel Perfect</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/7943/1254757574" alt="" height="32" width="32" class="IFL" />Pixel Perfect is a Firefox/Firebug extension that allows web developers and designers to easily overlay a web composition over top of the developed HTML. * Requires Firebug <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/60?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Web Developer</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/60/1252695377" alt="" height="32" width="32" class="IFL" />The Web Developer extension adds a menu and a toolbar with various web developer tools. <br class="C" /></p>
<blockquote class="publisher-comment"><p>This add-on is 1 of the top 2 most important add-ons for web developers.  The other is firebug.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1843?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Firebug</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1843/1254249333" alt="" height="32" width="32" class="IFL" />Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page&#8230; Firebug 1.4 requires Firefox 3.0 or higher. <br class="C" /></p>
<blockquote class="publisher-comment"><p>By far, without a doubt, the single most important and valuable add on for ANY web developer.  This is the one that is definitely required.  The features are too numerous to name here.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3829?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Live HTTP Headers</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3829/1245295166" alt="" height="32" width="32" class="IFL" />View HTTP headers of a page and while&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very helpful for those that don&#8217;t have and use wireshark.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2464?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FoxyProxy</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2464/1254948830" alt="" height="32" width="32" class="IFL" />FoxyProxy is an advanced proxy management tool that completely replaces Firefox&#8217;s limited proxying capabilities. It offers more features than SwitchProxy, ProxyButton, QuickProxy, xyzproxy, ProxyTex, TorButton, etc. <br class="C" /></p>
<blockquote class="publisher-comment"><p>The most complete proxifying tool for firefox, multiple configurations possible.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/321?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SearchStatus</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/321/1254725500" alt="" height="32" width="32" class="IFL" />Display the Google PageRank, Alexa rank, Compete ranking and SEOmoz Linkscape mozRank anywhere in your browser, along with fast keyword density analyser, keyword/nofollow highlighting, backward/related links, Alexa info and more. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds a very unobtrusive way to check the pagerank, and several other SEO statistics but only when you click a button (if configured that way) very helpful occasionally.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/201?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">DownThemAll!</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/201/1253178038" alt="" height="32" width="32" class="IFL" />The first and only download manager/accelerator built inside Firefox! <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very nice, easy, fast, and unobtrusive add-on that lets you download all files of a certain type to a certain save location, lets you use builtin filters or configure your own using basic REGEX.  Very helpful.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1801?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Clear Cache Button</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1801/1248704772" alt="" height="32" width="32" class="IFL" />Adds a clear cache toolbar button. After installing the extension, find the clear cache button in the toolbar customization&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>A button you can add to your toolbar that clears your firefox cache (not cookies or history) which is invaluable for web developers.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12006?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Wolfram Alpha Google</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12006/1254285310" alt="" height="32" width="32" class="IFL" />Display Wolfram Alpha results in Google searches. No need to switch search engines when you can use both at once! <br class="C" /></p>
<blockquote class="publisher-comment"><p>The new search is a glimpse at the future of computing.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3895?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Personal Menu</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3895/1253278678" alt="" height="32" width="32" class="IFL" />&#8220;Menus Toolbar&#8221; item is now available in Toolbar Context Menu and you may hide it forever! <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you go beyond firefox builtin menu editing and create a custom toolbar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7613?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Jiffy</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds a new panel to Firebug for displaying timing measurements for JavaScript applications. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds the ability to time or profile your javascript, I usually leave disabled.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9603?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireRainbow</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9603/1248403194" alt="" height="32" width="32" class="IFL" />Javascript syntax highlighting for Firebug 1.3+ <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7684?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Fire.fm</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/7684/1254412991" alt="" height="32" width="32" class="IFL" />Fire.fm gives you access to the extensive music library on Last.fm. Last.fm gives free radio to the US, UK, and Germany, plus subscriber-based service to the rest of the world. Listen to your favorite music and discover new artists in the process. <br class="C" /></p>
<blockquote class="publisher-comment"><p>What would work be without free streaming music that is customizable and recommends music based on your history.  Conveniently can be added to your status bar, or your toolbar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/138?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">StumbleUpon</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/138/1248392473" alt="" height="32" width="32" class="IFL" />StumbleUpon discovers web sites based on your interests, learns what you like and brings you more. <br class="C" /></p>
<blockquote class="publisher-comment"><p>StumbleUpon is great.  Very cool way to see relevant and interesting web development articles and sites.</p>
</blockquote>
</div>
<hr class="C" />
<p><a href="http://www.askapache.com/firefox/best-firefox-addons-webdev.html">Firefox Add-ons for Web Developers</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/firefox/best-firefox-addons-webdev.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Advanced WordPress wp-config.php Tweaks</title>
		<link>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html</link>
		<comments>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html#comments</comments>
		<pubDate>Sat, 03 Oct 2009 07:23:37 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[phpinfo]]></category>
		<category><![CDATA[wp-config.php]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3341</guid>
		<description><![CDATA[<p>The bottom line for this article is that I want to make WordPress as fast, secure, and easy to install, run, and manage because I am using it more and more for client production sites, I will work for days in order to solve an issue so that I never have to spend time on that issue again. Time is money in this industry and that is ultimately (time) what there is to gain by tweaking WordPress.</p>

<p class="cnote"><strong>Note:</strong> I spent no time on readability, this is primarily a read the code and figure it out article.. This is for advanced users looking for a reference or discussion and for those of you looking to advance.  Feedback would be great <em>if you make it that far..</em></p>]]></description>
			<content:encoded><![CDATA[<p>The bottom line for this article is that I want to make WordPress as fast, secure, and easy to install, run, and manage because I am using it more and more for client production sites, I will work for days in order to solve an issue so that I never have to spend time on that issue again. Time is money in this industry and that is ultimately (time) what there is to gain by tweaking WordPress.</p>
<p class="cnote"><strong>Note:</strong> I spent no time on readability, this is primarily a read the code and figure it out article.. This is for advanced users looking for a reference or discussion and for those of you looking to advance.  Feedback would be great <em>if you make it that far..</em></p>
<p>For a better handle on the way I like to structure web site directories, see <a href="http://www.askapache.com/htaccess/optimize-website-files-cache-security.html">Optimize a Website for Speed, Security, and Easy Management</a> but note it is a bit outdated compared to what I&#8217;m doing now.  I don&#8217;t have the luxury of using only one type of server, or hosting provider anymore, so I have been working towards making things even more portable in order to move from host to host from server to server without issues i.e. my portable <a href="http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html">.bash_profile</a>.</p>
<p>So I&#8217;ve been basically experimenting various ways to accomplish that and thought I would share what I am currently doing for my benefit and hopefully get some input.  All of my WP installs run the development version, and one main idea with my setups is that upgrading is automated.  So I really keep the WordPress install clean and use plugins and wp-config.php to do all the customization.</p>
<ul>
<li>Portability &#8211; Hands-free upgrades and easy to move</li>
<li>Security &#8211; Additional security and protection</li>
<li>Speed &#8211; Less CPU and Disk I/O</li>
<li>Customization &#8211; All my favorite customizations</li>
</ul>
<h2>wp-config.php</h2>
<p>These are the main settings I use.. Seriously this is more like an interactive article, because to understand it you will need to do some code grepping.  You may want to grab a jolt.</p>
<h3>ASKAPACHE_ROOT</h3>
<p>The ASKAPACHE_ROOT variable is just a better way for me to be able to include and access all the different files in my site tree.  For instance, in my non-wp php files, I can do this:</p>
<pre>
!defined(&#039;ASKAPACHE_ROOT&#039;) &#038;&#038; require $_SERVER[&#039;DOCUMENT_ROOT&#039;] . &#039;/wp-config.php&#039;;
include(ASKAPACHE_ROOT . &#039;/includes/custom-download.inc.php&#039;);
</pre>
<h3>ASKAPACHE_LOCK</h3>
<p>This is one of my all-time favorite hacks, that I think is one of the most useful methods I employ as a web developer.  This allows me to use far-future-expire headers for optimum caching, while still forcing browsers to re-validate every day or so automatically, or forcing them to re-validate whenever I change the suffix.  This takes advantage of the <a href="http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html">mod_rewrite trick</a> that I use on EVERY site I run, definately worth learning. Because I practice best-practice web-standards, for every web site I create a single css file and javascript file, which I then add to the template like:</p>
<pre>
&lt;link rel="stylesheet" type="text/css" media="all" href="http://z.askapache.com/c/apache-0&lt;?php echo ASKAPACHE_LOCK?&gt;.css" /&gt;
&lt;script src="http://z.askapache.com/j/apache-0&lt;?php echo ASKAPACHE_LOCK;?&gt;.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<pre>
&lt;?php
/**
 * The base configurations of the WordPress.
 *
 * This file has the following configurations: MySQL settings, Table Prefix,
 * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
 * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
 * wp-config.php} Codex page. You can get the MySQL settings from your web host.
 *
 * This file is used by the wp-config.php creation script during the
 * installation. You don&#039;t have to use the web site, you can just copy this file
 * to "wp-config.php" and fill in the values.
 *
 * @package WordPress
 */
/* http://codex.wordpress.org/Editing_wp-config.php */
&nbsp;
/** /home/liet/askapache.com */
!defined(&#039;ASKAPACHE_ROOT&#039;) &#038;&#038; define(&#039;ASKAPACHE_ROOT&#039;, str_replace(&#039;/htdocs&#039;,&#039;&#039;, $_SERVER[&#039;DOCUMENT_ROOT&#039;]));
&nbsp;
/** The 008 at the end is for manual tweaking.  time() returns seconds since &#039;00:00:00 1970-01-01 UTC&#039;. */
// http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html
!defined(&#039;ASKAPACHE_LOCK&#039;) &#038;&#038; define(ASKAPACHE_LOCK&#039;, substr(time(),0,5).&#039;008&#039;); // 12533001
&nbsp;
/** absolute path to the Wordpress directory */
!defined(&#039;ABSPATH&#039;) &#038;&#038; define(&#039;ABSPATH&#039;, ASKAPACHE_ROOT .&#039;/htdocs/&#039;);
&nbsp;
/**
 * WP_SITEURL, defined since WordPress Version 2.2, allows the WordPress address (URL) to be defined. The valued defined is the address where your WordPress core files reside.
 * It should include the http:// part too. Do not put a slash "/" at the end.
 * Setting this value in wp-config.php overrides the wp_options table value for siteurl and disables the WordPress address (URL) field in the Administration &gt; Settings &gt; General panel.
 */
!defined(&#039;WP_SITEURL&#039;) &#038;&#038; define(&#039;WP_SITEURL&#039;, &#039;http://&#039;.$_SERVER[&#039;SERVER_NAME&#039;]);
&nbsp;
/**
 * WP_HOME is another wp-config.php option added in WordPress Version 2.2. Similar to WP_SITEURL,
 * WP_HOME overrides the wp_options table value for home but does not change it permanently.
 * home is the address you want people to type in their browser to reach your WordPress blog. It should include the http:// part. Also, do not put a slash "/" at the end.
 */
!defined(&#039;WP_HOME&#039;) &#038;&#038; define(&#039;WP_HOME&#039;, WP_SITEURL);
&nbsp;
/** no trailing slash, full paths only */
!defined(&#039;WP_CONTENT_DIR&#039;) &#038;&#038; define( &#039;WP_CONTENT_DIR&#039;, ABSPATH . &#039;wp-content&#039; );
&nbsp;
// full url - WP_CONTENT_DIR is defined further up
!defined(&#039;WP_CONTENT_URL&#039;) &#038;&#038; define( &#039;WP_CONTENT_URL&#039;, WP_SITEURL . &#039;/wp-content&#039;);
&nbsp;
/** Allows for the plugins directory to be moved from the default location. @since 2.6.0 */
// full path, no trailing slash
!defined(&#039;WP_PLUGIN_DIR&#039;) &#038;&#038; define( &#039;WP_PLUGIN_DIR&#039;, WP_CONTENT_DIR . &#039;/plugins&#039; );
&nbsp;
/** Allows for the plugins directory to be moved from the default location. @since 2.6.0 */
// full url, no trailing slash
!defined(&#039;WP_PLUGIN_URL&#039;) &#038;&#038; define( &#039;WP_PLUGIN_URL&#039;, WP_CONTENT_URL . &#039;/plugins&#039; );
&nbsp;
/** Allows for the plugins directory to be moved from the default location. @since 2.1.0 */
// Relative to ABSPATH.  For back compat.
//!defined(&#039;PLUGINDIR&#039;) &#038;&#038; define( &#039;PLUGINDIR&#039;, &#039;wp-content/plugins&#039; );
&nbsp;
/** Number of autosaves to save. TRUE is default and enables post revisions, FALSE disables revisions completely. */
!defined(&#039;WP_POST_REVISIONS&#039;) &#038;&#038; define(&#039;WP_POST_REVISIONS&#039;, 150);
&nbsp;
/* ini_set(&#039;memory_limit&#039;, WP_MEMORY_LIMIT); */
!defined(&#039;WP_MEMORY_LIMIT&#039;) &#038;&#038; define(&#039;WP_MEMORY_LIMIT&#039;, &#039;64M&#039;);
&nbsp;
/** Only check at this interval for new messages. Default is 5min */
/** @since 2.9  */
!defined(&#039;WP_MAIL_INTERVAL&#039;) &#038;&#038; define(&#039;WP_MAIL_INTERVAL&#039;, 3600); // 1 hour
&nbsp;
/** Saves updated post values to post from edit window every x seconds. (default 60)
 * When editing a post, WordPress uses Ajax to auto-save revisions to the post as you edit. You may want to increase this setting for longer delays in between auto-saves, or decrease the setting to make sure you never lose changes.
 * @since 2.5.0 */
!defined( &#039;AUTOSAVE_INTERVAL&#039; ) &#038;&#038; define( &#039;AUTOSAVE_INTERVAL&#039;, 60 );
&nbsp;
/** @since 2.9.0  */
/** Permanently deletes posts, pages, attachments, and comments which have been in the trash for EMPTY_TRASH_DAYS. */
!defined( &#039;EMPTY_TRASH_DAYS&#039; ) &#038;&#038; define( &#039;EMPTY_TRASH_DAYS&#039;, 300 );
</pre>
<hr class="C" />
<h2>Debugging WordPress</h2>
<p>One of my secrets for getting really good at this stuff is to master debugging.  There is really not ever a time when I am working on a site that I don&#8217;t have <a href="http://www.askapache.com/security/elite-log-file-scrolling-with-color-syntax.html">color-highlighted logs scrolling automatically in an ssh window</a>.  It&#8217;s really almost impossible to fix problems with wordpress or do any kind of advanced anything without being able to view debugging info.  At first I relied heavily on a <a href="http://www.askapache.com/php/custom-phpini-tips-and-tricks.html">custom php.ini</a> being available on the server, but after having to deal with many hosts who don&#8217;t allow <code>php.ini</code> files I now rely completely on setting values using <a href="http://php.net/manual/en/function.ini-set.php">ini_set</a> for ultimate portability. Detailed towards the end of this article and is also included in this <code>wp-config.php</code></p>
<pre>
/**#@+
 * DEBUGGING STUFF
 */
/** display of notices during development. if false, error_reporting is E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR otherwise E_ALL */
!defined(&#039;WP_DEBUG&#039;) &#038;&#038; define(&#039;WP_DEBUG&#039;, false);
&nbsp;
/** The SAVEQUERIES definition saves the database queries to a array and that array can be displayed to help analyze those queries.
 *  The information saves each query, what function called it, and how long that query took to execute.  */
!defined(&#039;SAVE_QUERIES&#039;) &#038;&#038; define(&#039;SAVE_QUERIES&#039;, WP_DEBUG);
&nbsp;
!defined(&#039;ACTION_DEBUG&#039;) &#038;&#038; define(&#039;ACTION_DEBUG&#039;, WP_DEBUG);
&nbsp;
/** This will allow you to edit the scriptname.dev.js files in the wp-includes/js and wp-admin/js directories.  */
!defined(&#039;SCRIPT_DEBUG&#039;) &#038;&#038; define(&#039;SCRIPT_DEBUG&#039;, WP_DEBUG);

&nbsp;
/** Add define(&#039;WP_DEBUG_LOG&#039;, true); to enable php debug logging to WP_CONTENT_DIR/debug.log */
//!defined(&#039;WP_DEBUG_LOG&#039;) &#038;&#038; define(&#039;WP_DEBUG_LOG&#039;, true);
&nbsp;
/** This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user.
 *  Add define(&#039;WP_DEBUG_DISPLAY&#039;, false); to wp-config.php to use the globally configured setting for display_errors and not force it to On */
!defined(&#039;WP_DEBUG_DISPLAY&#039;) &#038;&#038; define(&#039;WP_DEBUG_DISPLAY&#039;, false);
</pre>
<hr class="C" />
<h2>Ultimate Security Tweaks</h2>
<p>Well, ultimate for WP&#8217;s built-in keys and password functions, this is all for wp-config.php keep in mind.  This is a very neccessary and recommended step, and is one of the only things I modify for each new installation.</p>
<h3>Security KEYS</h3>
<p>If like me you are familiar with password-cracking software like John the ripper, rainbow hash tables, l0pht-crack, etc.. then you will like to know that you can specify your own keys and salts for the encryption used by WP.  They are <code>AUTH_KEY</code>, <code>AUTH_SALT</code>, <code>SECURE_AUTH_KEY</code>, <code>SECURE_AUTH_SALT</code>, <code>LOGGED_IN_KEY</code>, <code>LOGGED_IN_SALT</code>, <code>NONCE_KEY</code>, <code>NONCE_SALT</code>,  <code>SECRET_KEY</code> and <code>SECRET_SALT</code>.</p>
<p>A random and long key gives you better encryption, and exponentially increasing that is using a random and long salt for the encryption.  Encryptions with known salts are incredibly easy to decrypt compared to encryptions with secure salts, because the salt + key individually need to be guessed in order to find a matching hash, vs. just the key if the salt is known.  See: <a href="http://www.askapache.com/security/locating-weak-passwords.html">Locating weak passwords</a>.</p>
<blockquote>
<p>A secret key is a hashing salt which makes your site harder to hack and access harder to crack by adding random elements to the password.</p>
<p>In simple terms, a secret key is a password with elements that make it harder to generate enough options to break through your security barriers. A password like &#8220;password&#8221; or &#8220;test&#8221; is simple and easily broken. A random, unpredictable password such as &#8220;88a7da62429ba6ad3cb3c76a09641fc&#8221; takes years to come up with the right combination.</p>
</blockquote>
<p>For more information on the technical background and breakdown of secret keys and secure passwords, see: </p>
<ul>
<li><a href="http://wordpress.org/support/topic/170987">WordPress Support Forum &#8211; HOWTO: Set up secret keys in WordPress 2.6+</a></li>
<li><a href="http://en.wikipedia.org/wiki/Password_cracking">Wikipedia&#8217;s explanation of Password Cracking</a></li>
</ul>
<p>I like to use the <a href="https://api.wordpress.org/secret-key/1.1/">WordPress.org secret-key service</a> 4 times.  That&#8217;s because for each key and salt I like to do: (1 key from api +random keyboard input+1 key from api).</p>
<pre>
/**#@+
 * Authentication Unique Keys.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies.
 * This will force all users to have to log in again.
 *
 * @since 2.6.0
 *
 * Get salt to add to hashes to help prevent attacks.
 *
 * The secret key is located in two places: the database in case the secret key
 * isn&#039;t defined in the second place, which is in the wp-config.php file. If you
 * are going to set the secret key, then you must do so in the wp-config.php
 * file.
 *
 * The secret key in the database is randomly generated and will be appended to
 * the secret key that is in wp-config.php file in some instances. It is
 * important to have the secret key defined or changed in wp-config.php.
 *
 * If you have installed WordPress 2.5 or later, then you will have the
 * SECRET_KEY defined in the wp-config.php already. You will want to change the
 * value in it because hackers will know what it is. If you have upgraded to
 * WordPress 2.5 or later version from a version before WordPress 2.5, then you
 * should add the constant to your wp-config.php file.
 *
 * Below is an example of how the SECRET_KEY constant is defined with a value.
 * You must not copy the below example and paste into your wp-config.php. If you
 * need an example, then you can have a
 * {@link https://api.wordpress.org/secret-key/1.1/ secret key created} for you.
 *
 * Salting passwords helps against tools which has stored hashed values of
 * common dictionary strings. The added values makes it harder to crack if given
 * salt string is not weak.
 *
 * @since 2.5
 * @link https://api.wordpress.org/secret-key/1.1/ Create a Secret Key for wp-config.php
 *
 * @return string Salt value from either &#039;SECRET_KEY&#039; or &#039;secret&#039; option
 */
define(&#039;AUTH_KEY&#039;,        &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?p[B+GR{@&gt;{Yq`c|LnG;dvq#| %OA_cbBSU6,rICC1o/c)-|&#039;);
define(&#039;SECURE_AUTH_KEY&#039;, &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[Bb15baar8&#038;R-r&lt;[T|?(xhJJABGq+Ux+U$)-Hltp/&#039;);
define(&#039;LOGGED_IN_KEY&#039;,   &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[B&lt;5n6DG|YWnJ9tY2!M1L)`{-$LW~~Ia%.uCbn!P. 41o2$Z$4&#039;);
define(&#039;NONCE_KEY&#039;,       &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[Bgu&lt;wM*zewR0.{+m:bmrB?wj!B,4]Wo+4 Avk ApR-D?E&#039;);
define(&#039;SECRET_KEY&#039;,     &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[B52ugH6muE9r4._iZwoYKUybrqLPpv|d Xr+|yrqhUE&#039;);
&nbsp;
define(&#039;AUTH_SALT&#039;,        &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdm~Ky%+%~PPa5b YEmDI%U[W!-B&#039;);
define(&#039;SECURE_AUTH_SALT&#039;, &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmad/7o6.AU3%9o-|Kqm]+eUqr-n~:ag&#039;);
define(&#039;LOGGED_IN_SALT&#039;,   &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmsLiCv@KJ{#wd(?qe(KcH3!&#039;);
define(&#039;NONCE_SALT&#039;,       &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmG9&gt;+wm 2)bS0Pd_+1rx0brX]ND8|&#039;);
define(&#039;SECRET_SALT&#039;,      &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdm2&lt;&gt;))U|sty)+4vpWooKls/^[vN&#039;);
/**#@-*/
</pre>
<hr class="C" />
<h2>Using SSL for Admin and Login</h2>
<p>SSL is kinda required from my point of view, it is just way to easy to sniff data off the wire otherwise.  At least with SSL you force them to use tools like burpsuite, paros proxy, webscarab, etc..</p>
<pre>
/** @since 2.6.0  */
!defined(&#039;FORCE_SSL_ADMIN&#039;) &#038;&#038; define(&#039;FORCE_SSL_ADMIN&#039;, true);
&nbsp;
/** @since 2.6.0  */
!defined(&#039;FORCE_SSL_LOGIN&#039;) &#038;&#038; define(&#039;FORCE_SSL_LOGIN&#039;, true);
</pre>
<h3>Mod_Rewrite to Force SSL</h3>
<p>This is pretty cool, it forces non-https for all urls except for /wp-admin and wp-login.php, which both require https.  It also checks for the logged_in_cookie, and if that is present in the request then it doesn't force non-https.  Kinda confusing if you don't have a <a href="http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html">mod_rewrite cheatsheet</a>.</p>
<pre>
RewriteCond %{THE_REQUEST} ^$ [OR]
RewriteCond %{REQUEST_URI} ^/(wp-admin|wp-login\.php).*$ [NC,OR]
RewriteCond %{HTTP_COOKIE} ^.*wp_li_sadfsdfasdf11b361cdsdfasdfasd=.*$ [NC]
RewriteRule .* - [S=1]
&nbsp;
RewriteCond %{HTTPS} =on [OR]
RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
RewriteRule .* http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
&nbsp;
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(wp-admin/.*|wp-login\.php.*)\ HTTP/ [NC]
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
</pre>
<hr class="C" />
<h2>File System Permissions</h2>
<p><a class="IFR" href="http://www.askapache.com/security/chmod-umask-fileperms-stat-tricks.html"><img src="/wp-content/uploads/2008/11/danger-chmod-screenshot.png" alt="chmod, umask, file permissions test" title="chmod, umask, file permissions test" /></a>You can get a basic and solid intro on file permissions by reading: <a href="http://codex.wordpress.org/Changing_File_Permissions">Changing File Permissions</a>, or you can check out some of my <a href="http://www.askapache.com/security/chmod-umask-fileperms-stat-tricks.html">file permission research</a>.<br class="C" /></p>
<pre>
/** The permissions as octal number, usually 0644 for files, 0755 for dirs.
 *  http://codex.wordpress.org/Changing_File_Permissions
 *  if ( !$wp_filesystem-&gt;mkdir($remote_destination, FS_CHMOD_DIR) )
 */
!defined(&#039;FS_CHMOD_DIR&#039;) &#038;&#038; define(&#039;FS_CHMOD_DIR&#039;, (0755 &#038; ~ umask()));
!defined(&#039;FS_CHMOD_FILE&#039;) &#038;&#038; define(&#039;FS_CHMOD_FILE&#039;, (0644 &#038; ~ umask()));
/**#@-*/
&nbsp;
/** Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default. */
//stream_set_timeout( $stream, FS_TIMEOUT );
//!defined(&#039;FS_TIMEOUT&#039;) &#038;&#038; define(&#039;FS_TIMEOUT&#039;, 30);
&nbsp;
//$this-&gt;link = @ftp_connect($this-&gt;options[&#039;hostname&#039;], $this-&gt;options[&#039;port&#039;], FS_CONNECT_TIMEOUT);
//!defined(&#039;FS_CONNECT_TIMEOUT&#039;) &#038;&#038; define(&#039;FS_CONNECT_TIMEOUT&#039;, 30);
&nbsp;
// function get_filesystem_method($args = array(), $context = false) {
//  $method = defined(&#039;FS_METHOD&#039;) ? FS_METHOD : false; //Please ensure that this is either &#039;direct&#039;, &#039;ssh&#039;, &#039;ftpext&#039; or &#039;ftpsockets&#039;
//!defined(&#039;FS_METHOD&#039;) &#038;&#038; define(&#039;FS_METHOD&#039;, &#039;direct&#039;);
&nbsp;
/** These methods for the WordPress core, plugin, and theme upgrades try to determine the WordPress path, as reported by PHP, but symlink trickery can sometimes
 * &#039;muck this up&#039; so if you know the paths to the various folders on the server, as seen via your FTP user, you can manually define them in the wp-config.php file.
 * FS_METHOD forces the filesystem method. It should only be "direct", "ssh", "ftpext", or "ftpsockets".
 * FTP_BASE is the full path to the "base" folder of the WordPress installation.
 * FTP_CONTENT_DIR is the full path to the wp-content folder of the WordPress installation.
 * FTP_PLUGIN_DIR is the full path to the plugins folder of the WordPress installation.
 * FTP_PUBKEY is the full path to your SSH public key.
 * FTP_PRIKEY is the full path to your SSH private key.
 * FTP_USER is either user FTP or SSH username. Most likely these are the same, but use the appropriate one for the type of update you wish to do.
 * FTP_PASS is the password for the username entered for FTP_USER. If you are using SSH public key authentication this can be omitted.
 * FTP_HOST is the hostname:port combination for your SSH/FTP server. The standard FTP port is 21 and the standard SSH port is 22.
 */
//define(&#039;FS_METHOD&#039;, &#039;ftpext&#039;);
//define(&#039;FTP_BASE&#039;, &#039;/path/to/wordpress/&#039;);
//define(&#039;FTP_CONTENT_DIR&#039;, &#039;/path/to/wordpress/wp-content/&#039;);
//define(&#039;FTP_PLUGIN_DIR &#039;, &#039;/path/to/wordpress/wp-content/plugins/&#039;);
//define(&#039;FTP_PUBKEY&#039;, &#039;/home/username/.ssh/id_rsa.pub&#039;);
//define(&#039;FTP_PRIKEY&#039;, &#039;/home/username/.ssh/id_rsa&#039;);
//define(&#039;FTP_USER&#039;, &#039;username&#039;);
//define(&#039;FTP_PASS&#039;, &#039;password&#039;);
//define(&#039;FTP_HOST&#039;, &#039;ftp.example.org:21&#039;);
&nbsp;
/**
 * Block requests through the proxy.
 *
 * Those who are behind a proxy and want to prevent access to certain hosts may do so. This will
 * prevent plugins from working and core functionality, if you don&#039;t include api.wordpress.org.
 *
 * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php file
 * and this will only allow localhost and your blog to make requests.
 * The constant WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
 * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
 *
 * @since 2.8.0
 * @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
/** @since 2.9  */
//!defined(&#039;WP_HTTP_BLOCK_EXTERNAL&#039;) &#038;&#038; define( &#039;WP_HTTP_BLOCK_EXTERNAL&#039;, false );
&nbsp;
/*
 * The constant WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
 * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
 *
 * @since 2.8.0
 * @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
 * $accessible_hosts = preg_split(&#039;|,\s*|&#039;, WP_ACCESSIBLE_HOSTS);
 * return !in_array( $check[&#039;host&#039;], $accessible_hosts ); //Inverse logic, If its in the array, then we can&#039;t access it.
 */
//!defined(&#039;WP_ACCESSIBLE_HOSTS&#039;) &#038;&#038; define( &#039;WP_ACCESSIBLE_HOSTS&#039;, &#039;askapache.com,askapache.org&#039; );
</pre>
<hr class="C" />
<h3>Cookies!</h3>
<p>There&#8217;s always a little comfort in having non-default cookies for security (against auto-bots), and using shorter names also means smaller HTTP Packets.</p>
<p>The <code>$cookie_hash</code> is my hack to get around the fact that <code>COOKIEHASH</code> isn&#8217;t definable in <code>wp-config</code>.</p>
<pre>
/**#@+
 * COOKIES
 * Used to guarantee unique hash cookies @since 1.5 */
$cookie_hash=md5(WP_SITEURL);
&nbsp;
/** Set a cookie now to see if they are supported by the browser.
 * setcookie(TEST_COOKIE, &#039;WP Cookie check&#039;, 0, COOKIEPATH, COOKIE_DOMAIN);
 * @since 2.3.0 */
!defined(&#039;TEST_COOKIE&#039;) &#038;&#038; define(&#039;TEST_COOKIE&#039;, &#039;wp_tc&#039;);
&nbsp;
/* @since 2.6.0 */
!defined(&#039;LOGGED_IN_COOKIE&#039;) &#038;&#038; define(&#039;LOGGED_IN_COOKIE&#039;, &#039;wp_li_&#039; . $cookie_hash);
&nbsp;
/* @since 2.6.0 */
!defined(&#039;SECURE_AUTH_COOKIE&#039;) &#038;&#038; define(&#039;SECURE_AUTH_COOKIE&#039;, &#039;wp_sa_&#039; . $cookie_hash);
&nbsp;
/* @since 2.5.0 */
!defined(&#039;AUTH_COOKIE&#039;) &#038;&#038; define(&#039;AUTH_COOKIE&#039;, &#039;wp_a_&#039; . $cookie_hash);
&nbsp;
/* @since 2.0.0 */
!defined(&#039;PASS_COOKIE&#039;) &#038;&#038; define(&#039;PASS_COOKIE&#039;, &#039;wp_p_&#039; . $cookie_hash);
&nbsp;
/* @since 2.0.0 */
!defined(&#039;USER_COOKIE&#039;) &#038;&#038; define(&#039;USER_COOKIE&#039;, &#039;wp_u_&#039; . $cookie_hash);
&nbsp;
/* ok unset this var, its not needed as COOKIEHASH will have this value, but is not definable in wp-config.php */
unset($cookie_hash);
&nbsp;
/** @since 1.2.0 */
!defined(&#039;COOKIEPATH&#039;) &#038;&#038; define(&#039;COOKIEPATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_HOME . &#039;/&#039; ) );
&nbsp;
/** @since 1.5.0 */
!defined(&#039;SITECOOKIEPATH&#039;) &#038;&#038; define(&#039;SITECOOKIEPATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_SITEURL . &#039;/&#039; ) );
&nbsp;
/** @since 2.6.0 */
!defined(&#039;ADMIN_COOKIE_PATH&#039;) &#038;&#038; define( &#039;ADMIN_COOKIE_PATH&#039;, SITECOOKIEPATH . &#039;wp-admin&#039; );
&nbsp;
/** @since 2.6.0 */
!defined(&#039;PLUGINS_COOKIE_PATH&#039;) &#038;&#038; define( &#039;PLUGINS_COOKIE_PATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_PLUGIN_URL)  );
&nbsp;
/** @since 2.0.0 */
!defined(&#039;COOKIE_DOMAIN&#039;) &#038;&#038; define(&#039;COOKIE_DOMAIN&#039;, $_SERVER[&#039;SERVER_NAME&#039;]);
</pre>
<hr class="C" />
<pre>
/**
  * The WP_CACHE setting, if true, includes the wp-content/advanced-cache.php script, when executing wp-settings.php.
  * For an advanced caching plugin to use, static because you would only want one
  * if ( defined(&#039;WP_CACHE&#039;) )@include WP_CONTENT_DIR . &#039;/advanced-cache.php&#039;;
  */
!defined(&#039;WP_CACHE&#039;) &#038;&#038; define(&#039;WP_CACHE&#039;, true);
&nbsp;
/** WordPress Localized Language, defaults to en_US.
 *
 * Change this to localize WordPress.  A corresponding MO file for the chosen
 * language must be installed to wp-content/languages. For example, install
 * de.mo to wp-content/languages and set WPLANG to &#039;de&#039; to enable German
 * language support. */
!defined(&#039;WPLANG&#039;) &#038;&#038; define (&#039;WPLANG&#039;, &#039;en_US&#039;);
&nbsp;
/** Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR
 *   and uses that folder if it exists. Or it uses the "languages" folder in WPINC. @since 2.1.0 */
//!defined(&#039;WP_LANG_DIR&#039;) &#038;&#038; define(&#039;WP_LANG_DIR&#039;, ABSPATH . WPINC . &#039;/languages&#039;);
&nbsp;
/** LANGDIR defines what directory the WPLANG .mo file resides. If LANGDIR is not defined WordPress looks first to wp-content/languages and then wp-includes/languages for the .mo defined by WPLANG file.  Old static relative path maintained for limited backwards compatibility - won&#039;t work in some cases*/
//!defined(&#039;LANGDIR&#039;) &#038;&#038; define(&#039;LANGDIR&#039;, &#039;wp-content/languages&#039;);
&nbsp;
/** Stores the location of the WordPress directory of functions, classes, and core content. @since 1.0.0 */
//!defined(&#039;WPINC&#039;) &#038;&#038; define(&#039;WPINC&#039;, &#039;wp-includes&#039;);
</pre>
<hr class="C" />
<h2>WPMU Stuff</h2>
<p>I personally don&#8217;t use.</p>
<pre>
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined(&#039;WPMU_PLUGIN_DIR&#039;) &#038;&#038; define( &#039;WPMU_PLUGIN_DIR&#039;, WP_CONTENT_DIR . &#039;/mu-plugins&#039; ); // full path, no trailing slash
&nbsp;
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined(&#039;WPMU_PLUGIN_URL&#039;) &#038;&#038; define( &#039;WPMU_PLUGIN_URL&#039;, WP_CONTENT_URL . &#039;/mu-plugins&#039; ); // full url, no trailing slash
&nbsp;
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined( &#039;MUPLUGINDIR&#039; ) &#038;&#038; define( &#039;MUPLUGINDIR&#039;, &#039;wp-content/mu-plugins&#039; ); // Relative to ABSPATH.  For back compat.
</pre>
<hr class="C" />
<h2>WordPress Database</h2>
<p>This is usually the only thing I have to manually edit when creating a new site, unless I just use the same DB and modify the $table_prefix, (farther down). I run everything I possibly can in UTF-8, but if you don&#8217;t already know alot about character sets, wow it is one of the most confusing things so you may want to save learning about that topic for another day.  Otherwise the following are helpful (<em>and show how confusing character sets are!</em>)</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/charset-charsets.html">Character Sets and Collations MySQL Support</a></li>
<li><a href="http://codex.wordpress.org/Converting_Database_Character_Sets">Converting Database Character Sets</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html">UTF-8 character sets</a> (<a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a>)</li>
</ul>
<p>If you ever setup WP to use the builtin membership features, make sure you learn about the <code>CUSTOM_USER_TABLE</code> and <code>CUSTOM_USER_META_TABLE</code> constants, I&#8217;ve found them very helpful.</p>
<pre>
/**#@+
 * MySQL settings
 */
/** The name of the database for WordPress */
define(&#039;DB_NAME&#039;, &#039;askapachewpblog75&#039;);
&nbsp;
/** The username to access the database */
define(&#039;DB_USER&#039;, &#039;askapache245d&#039;);
&nbsp;
/** The password for the username to access the database */
define(&#039;DB_PASSWORD&#039;, &#039;asdfklj2340&#039;);
&nbsp;
/** The hostname to connect to the database at */
define(&#039;DB_HOST&#039;, &#039;mysql.askapache.com&#039;);
&nbsp;
/** The charset of the database */
define(&#039;DB_CHARSET&#039;, &#039;utf8&#039;);
&nbsp;
/** The collation of the database */
define(&#039;DB_COLLATE&#039;, &#039;utf8_general_ci&#039;);
</pre>
<hr class="C" />
<h2>$table_prefix</h2>
<p>The <code>$table_prefix</code> is the value placed in the front of your database tables. Change the value if you want to use something other than wp_ for your database prefix. Typically this is changed if you are <a href="http://codex.wordpress.org/Installing_Multiple_Blogs">installing multiple WordPress blogs</a> in the same database, and also for enhanced security.</p>
<p>Its a safe and good idea to change this value pre-installation to add more security to your WordPress blog. Exploits attempted against your WordPress blog by malicious crackers often are built with the premise that your blog uses the prefix wp_, by changing the value you mitigate some attack vectors. </p>
<pre>
/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each a unique
 * prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = &#039;ar15_&#039;;
&nbsp;
/** CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE are used to designated that the user and usermeta tables normally utilized by WordPress are not used, instead these values/tables are used to store your user information. */
//!defined(&#039;CUSTOM_USER_TABLE&#039;) &#038;&#038; define(&#039;CUSTOM_USER_TABLE&#039;, $table_prefix . &#039;my_users&#039;);
//!defined(&#039;CUSTOM_USER_META_TABLE&#039;) &#038;&#038; define(&#039;CUSTOM_USER_META_TABLE&#039;, $table_prefix . &#039;my_usermeta&#039;);
</pre>
<h2>Setup PHP Ini Settings</h2>
<pre>
&nbsp;
/** Turns the output of errors on or off, you really never want this on, you should only view errors by reading the log file. */
ini_set(&#039;display_errors&#039;, WP_DEBUG_DISPLAY);
&nbsp;
/** Tells whether script error messages should be logged to the server&#039;s error log or error_log. */
ini_set(&#039;log_errors&#039;, &#039;On&#039;);
&nbsp;
/** http://us.php.net/manual/en/timezones.php */
ini_set(&#039;date.timezone&#039;, &#039;America/Indianapolis&#039;);
&nbsp;
/** Where to log php errors */
ini_set(&#039;error_log&#039;, ASKAPACHE_ROOT . &#039;/logs/php_error.log&#039;);
&nbsp;
/** Set the memory limit, otherwise defaults to &#039;32M&#039; */
ini_set(&#039;memory_limit&#039;, WP_MEMORY_LIMIT);
</pre>
<h2>Sessions are slow</h2>
<p>So I only use sessions when I have a specific use&#8230; In this case I need sessions only when one of the tools in the /online-tools/ directory is being used.  And that is for the <a href="http://www.askapache.com/security/php-captcha-anti-spam-example.html">captcha image</a>.  In the future I won&#8217;t ever use sessions.</p>
<pre>
if(preg_match( &#039;#^/online-tools/#&#039;,$_SERVER[&#039;REQUEST_URI&#039;])) session_start();
</pre>
<h2>Include Custom Files</h2>
<p>Sure you could use the my-hacks.php that WP allows, or you can just stick your functions in your <code>TEMPLATEPATH/functions.php</code> file, but they are executed only after the wp-settings.php file, which may be too late for your file.</p>
<p>In the past I&#8217;ve also used the <a href="http://us2.php.net/manual/en/ini.core.php#ini.auto-prepend-file">auto_prepend_file</a> settings to run my script before anything (index.php) but I ran into some issues on different hosts, and it wasn&#8217;t as portable.</p>
<p>This is useful because you can have a file with globally available functions that you can use in non-WP areas as well as WP areas.  I am moving away from this more and more as I learn more about classes and build plugins instead for portability.</p>
<pre>
include_once ASKAPACHE_ROOT . &#039;/includes/myfunctions.inc&#039;;
&nbsp;
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . &#039;wp-settings.php&#039;);
?&gt;
</pre>
<h2>Some Useful PHP</h2>
<p>I am constantly trying to make my sites and code more portable, so I am using plugins alot more to accomplish things that I use to do with separate php.  Here are some examples of minimal php.</p>
<pre>
add_filter("the_generator", create_function(&#039;$a&#039;,&#039;return "";&#039;));
add_filter(&#039;the_content&#039;, create_function(&#039;$a&#039;, &#039;return ((is_feed())? $a."&lt;p&gt;&lt;a href=\"".get_permalink()."\"&gt;".get_the_title()."&lt;/a&gt; originally appeared on ".get_bloginfo("name").".&lt;/p&gt;" : $a);&#039;), 99999);
add_filter(&#039;excerpt_length&#039;, create_function(&#039;$a&#039;, &#039;return 300;&#039;),99);
add_filter(&#039;excerpt_more&#039;, create_function(&#039;$a&#039;, &#039;return "&hellip;";&#039;),99);
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"pingback\" href=\"&#039;.get_bloginfo(&#039;pingback_url&#039;).&#039;\" /&gt;\n";&#039;), 95 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"schema.rss\" href=\"http://purl.org/rss/1.0/\" /&gt;\n";&#039;), 96 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"schema.rel\" href=\"http://purl.org/vocab/relationship/\" /&gt;\n";&#039;), 97 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"meta\" type=\"application/rdf+xml\" href=\"/foaf.rdf\" /&gt;\n";&#039;), 98 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link href=\"/favicon.ico\" rel=\"shortcut icon\" type=\"image/x-icon\" /&gt;\n";&#039;), 99 );
</pre>
<h2>Debugging Note</h2>
<p><a href="http://wordpress.org/extend/plugins/askapache-debug-viewer/screenshots/"><img alt="AskApache Advanced Debugging Output" src="http://s.wordpress.org/extend/plugins/askapache-debug-viewer/screenshot-1.png?r=160129" title="AskApache Advanced Debugging Output" width="625" height="548" /></a>If you read this far than you probably know how important debugging is, but I sometimes like to stick the best tips deep in my articles to make sure only YOU find it.  GRTFM isn&#8217;t used on this site, it&#8217;s mostly a requirement because my writing can get pretty bad..  The point, debugging is more than a crucial requirement if you want to do anything cool.  Don&#8217;t worry I got you.. check my <a href="http://wordpress.org/extend/plugins/askapache-debug-viewer/">AskApache Debug Viewer Plugin from the official WP site</a>.  It&#8217;s pretty close to providing as verbose amount of information that I could possibly figure out how to get out of php, probably more than you have ever seen at least, I focused on quantity.  I use it all the time on new installs as there is no setup required and it tells me advanced information about the setup of the server, hacker code for sure.<br class="C" /></p>
<p>Here&#8217;s a quick function to see set global vars, I just think this is interesting code.</p>
<pre>
function askapache_global_debug(){
  global $_GET,$_POST,$_COOKIE,$_SESSION,$_ENV,$_FILES,$_SERVER,$_REQUEST,$HTTP_POST_FILES,$HTTP_POST_VARS,$HTTP_SERVER_VARS,$HTTP_RAW_POST_DATA,$HTTP_GET_VARS,$HTTP_COOKIE_VARS,$HTTP_ENV_VARS;
  $gv=create_function(&#039;$n&#039;,&#039;global $$n; ob_start(); if ( is_array($$n) &#038;&#038; sizeof($$n)&gt;0 &#038;&#038; print("[{$n}]\n") ) print_r($$n);return ob_get_clean();&#039;);
  foreach (array(&#039;_GET&#039;,&#039;_POST&#039;,&#039;_COOKIE&#039;,&#039;_SESSION&#039;,&#039;_ENV&#039;,&#039;_FILES&#039;,&#039;_SERVER&#039;,&#039;_REQUEST&#039;,&#039;HTTP_POST_FILES&#039;,&#039;HTTP_POST_VARS&#039;,&#039;HTTP_SERVER_VARS&#039;,&#039;HTTP_RAW_POST_DATA&#039;,&#039;HTTP_GET_VARS&#039;,&#039;HTTP_COOKIE_VARS&#039;,&#039;HTTP_ENV_VARS&#039;) as $k)echo $gv($k);
  print_r(get_defined_constants());
}
</pre>
<p class="anote">Also check the WordPress Codex page: <a href="http://codex.wordpress.org/Editing_wp-config.php">Editing wp-config.php</a></p>
<p><a href="http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html">Advanced WordPress wp-config.php Tweaks</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Protecting Files with Advanced Mod_Rewrite Anti-Hotlinking</title>
		<link>http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html</link>
		<comments>http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html#comments</comments>
		<pubDate>Wed, 16 Sep 2009 05:09:11 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache Modules]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3287</guid>
		<description><![CDATA[<p><a class="IFL" href="http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html "><img src="/wp-content/uploads/2009/09/866310_predestrian_lights-71x116.jpg" alt="Stop hotlinking with .htaccess mod_rewrite" title="Stop hotlinking with .htaccess mod_rewrite" width="71" height="116" /></a>If you have files on your site that you don't want indexed by malicious search engines, grabbed and leeched by malicious spammers, or stolen and made available elsewhere, you can use mod_rewrite to drastically reduce or totally reduce that activity.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="/wp-content/uploads/2009/09/866310_predestrian_lights.jpg"><img src="/wp-content/uploads/2009/09/866310_predestrian_lights.jpg" alt="Stop hotlinking with .htaccess mod_rewrite" title="Stop hotlinking with .htaccess mod_rewrite" width="184" height="300" class="size-full wp-image-3288" /></a><br style="padding-top:2em;" /><br />If you have files on your site that you don&#8217;t want indexed by malicious search engines, grabbed and leeched by malicious spammers, or stolen and made available elsewhere, you can use mod_rewrite to drastically reduce or totally reduce that activity.</p>
<h2>The Worst Kind of People</h2>
<p><strong>Spammers, and Leechers</strong>.  They operate like this:  Let&#8217;s say you have some mp3 files on a server, and SOMEWHERE on the web there is a link to that mp3 file&#8217;s location.  This includes in javascript files, css files, robots.txt files, the spammers and leechers robots check all those files looking for the type of link they are looking for.   Then they try to request that file usually utilizing a number of different types of requests to get access to the file.  Then they use it for personal gain, at your peril.</p>
<p>Some robots perform valuable services for the world wide web community, and other leeching programming is pretty cool, so not all these activities are perpetrated by nefarious spammers.</p>
<p><br class="C" /></p>
<h2>Blocking by IP COOKIE</h2>
<p>Ok so if a link exists to your file, it is going to be requested by a robot eventually, so the way to defeat them is by doing something on your site that modifies the way a user would request it.  Robots for the most part are not javascript-capable, so the most-common advanced method is to set a cookie using javascript, and then we can check for that cookie in the request for the file using mod_rewrite.</p>
<p>So if your site sets a cookie named fspammers, and furthermore gives that cookie a value of 445, then this is what the request sent by an HTTP Client like Firefox looks like.</p>
<pre>
GET /hotlink/lovefreedom.mp3 HTTP/1.1
Host: z.askapache.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.askapache.com/wordpress/seo-in-wordpress.html
Cookie: fspammers=455
</pre>
<h2>Mod_Rewrite HTTP Headers</h2>
<p>The mod_rewrite module has access to ALL the HTTP Headers sent in a request, so for each of the HTTP Headers in the request example above, we can use mod_rewrite to validate.</p>
<h2>Mod_Rewrite .htaccess Example</h2>
<p>Finally, now that everyone is on the same page about what is really going on, here is the <a href="http://www.askapache.com/htaccess/htaccess.html" title=".htaccess tutorial">.htaccess</a> code that blocks any requests for anything in the /hotlink/ folder.</p>
<p>Here are the triggers this code blocks access based on.</p>
<ol>
<li><strong>Cookie</strong>: Checks if fspammers cookie is present, and that it has the value of 445. </li>
<li><strong>HTTP Protocol</strong>: Checks if HTTP 1.1 is being used (many robots use 1.0)</li>
<li><strong>Host</strong>: Checks that the HOST Requested was z.askapache.com</li>
<li><strong>Referer</strong>:  Checks for Referring site is z.askapache.com or www.askapache.com</li>
</ol>
<pre>
RewriteEngine On
RewriteBase /
&nbsp;
RewriteCond %{HTTP_COOKIE} !^.*fspammers=445.*$ [NC,OR]
RewriteCond %{THE_REQUEST} !^[A-Z]{3,9}\ /(.*)\ HTTP/1\.1 [NC,OR]
RewriteCond %{HTTP_HOST} !^z\.askapache\.com$ [NC,OR]
RewriteCond %{HTTP_REFERER} !^http://(www|z)\.askapache\.com.*$ [NC]
RewriteRule ^hotlink/.*$ - [F]&lt;/p&gt;
</pre>
<p><a href="http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html">Protecting Files with Advanced Mod_Rewrite Anti-Hotlinking</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP and AJAX shell console</title>
		<link>http://www.askapache.com/ajax/php-and-ajax-shell-console.html</link>
		<comments>http://www.askapache.com/ajax/php-and-ajax-shell-console.html#comments</comments>
		<pubDate>Sun, 14 Jun 2009 01:01:15 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[shell console]]></category>

		<guid isPermaLink="false">http://www.askapache.com/tools/php-and-ajax-shell-console.html</guid>
		<description><![CDATA[<p><a class="IFL" href='http://www.askapache.com/tools/php-and-ajax-shell-console.html' title='PHP AJAX shell console'><img src='/wp-content/uploads/2007/08/php-ajax-shell-console.thumbnail.png' alt='PHP AJAX shell console' /></a> Ever wanted to execute commands on your server through php? Now you can.  I'm calling this file (see below) shell.php and it allows you to run commands on your web server with the same permissions that your php executable has.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to execute commands on your server through php to mimick a shell login? <strong>Now you can.</strong>  I&#8217;m calling this file (see below) shell.php and it allows you to run commands on your web server with the same permissions that your php executable has.</p>
<p id="aaflash"><span class="v640"><span id="phpajaxshell"><span class="load">Loading Video</span><a rel="nofollow" class="getFlash" href="http://www.askapache.com/getflash/"></a></span></span></p>
<h2>PHP for <code>shell.php</code></h2>
<p>Substitue 1.1.1.1 for your IP address.. or see below for password authentication methods.</p>
<pre>
&lt;?php
 if ($_SERVER[&#039;REMOTE_ADDR&#039;] !== &#039;1.1.1.1&#039;) die();
 ob_start();
 if (!empty($_GET[&#039;cmd&#039;])){
 $ff=$_GET[&#039;cmd&#039;];
 #shell_exec($ff);
 system($ff);
 #exec($ff);
 #passthru($ff);
 }
 else {
?&gt;
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
&lt;title&gt;PHP AJAX Shell&lt;/title&gt;
&lt;script type="text/javascript" language="javascript"&gt;var CommHis=new Array();var HisP;
function doReq(_1,_2,_3){var HR=false;if(window.XMLHttpRequest){HR=new XMLHttpRequest();if(HR.overrideMimeType){HR.overrideMimeType("text/xml");}}
else{if(window.ActiveXObject){try{HR=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{HR=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){}}}}if(!HR){return false;}HR.onreadystatechange=function(){if(HR.readyState==4){
if(HR.status==200){if(_3){eval(_2+"(HR.responseXML)");}else{eval(_2+"(HR.responseText)");}}}};HR.open("GET",_1,true);HR.send(null);}
function pR(rS){var _6=document.getElementById("outt");var _7=rS.split("\n\n");
var _8=document.getElementById("cmd").value;_6.appendChild(document.createTextNode(_8));
_6.appendChild(document.createElement("br"));for(var _9 in _7){var _a=document.createElement("pre");
_a.style.display="inline";line=document.createTextNode(_7[_9]);_a.appendChild(line);_6.appendChild(_a);
_6.appendChild(document.createElement("br"));}_6.appendChild(document.createTextNode(":-&gt; "));_6.scrollTop=_6.scrollHeight;
document.getElementById("cmd").value="";}function keyE(_b){switch(_b.keyCode){
case 13:var _c=document.getElementById("cmd").value;if(_c){CommHis[CommHis.length]=_c;HisP=CommHis.length;var _d=document.location.href+"?cmd="+escape(_c);
doReq(_d,"pR");}break;
case 38:if(HisP&gt;0){HisP&#45;-;document.getElementById("cmd").value=CommHis[HisP];}break;
case 40:if(HisP&lt;CommHis.length-1){HisP++;document.getElementById("cmd").value=CommHis[HisP];}break;default:break;}}
&lt;/script&gt;&lt;/head&gt;&lt;body style="font-family:courier"&gt;
&lt;form onsubmit="return false" style="color:#3F0;background:#000;position:relative;min-height:450px;max-height:490px"&gt;
&lt;div id="outt" style="overflow:auto;padding:5px;height:90%;min-height:450px;max-height:490px"&gt;:-&gt;&lt;/div&gt;
&lt;input tabindex="1" onkeyup="keyE(event)" style="color:#FFF;background:#333;width:100%;" id="cmd" type="text" /&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;?php } ?&gt;
</pre>
<h2>Read this</h2>
<p><strong>Note</strong>:  The history feature works by remembering the last commands that you typed.. Access them by pressing the up or down arrows on your keyboard.</p>
<p>This is not an interactive session, so you cannot cd to a directory and then do stuff in that directory..  You may however be able to do stuff like <code>/bin/bash -c "cd ../../;mv this there;ls -la;"</code> or you could try exporting your current dir or something..</p>
<p>Writing shell scripts and serving them on your web server works by renaming the file.sh to file.cgi and chmodding it to 750 or +x.   Also make sure you try <code>dos2unix -dv file.cgi</code> If you can&#8217;t get it to work.. </p>
<h3>Example shell script as cgi</h3>
<pre>
#!/bin/sh
export MYBNAME=`date +%mx%dx%y-%Hx%M.tgz`
tar -czf ${HOME}/backups/${MYBNAME} ${HOME}/site1/
exit 0;
</pre>
<h2>Locking Down Access to your shell.php</h2>
<p>Thanks to the comment by Andrew Ramsden, Here are a couple ways to secure your shell.php file so that only you can run this script.</p>
<h3>Secure your remote shell by adding this to your shell.php</h3>
<p>Add this line to the very top of your shell.php file to make sure that only you can access this script.  Everyone else sees a blank screen.</p>
<pre>
if ($_SERVER[&#039;REMOTE_ADDR&#039;] !== &#039;1.1.1.1&#039;) die();
</pre>
<h3>Secure your remote shell with htaccess</h3>
<p>This only allows access from IP 1.1.1.1 and redirects everyone else.  See <a href="http://www.askapache.com/htaccess/apache-authentication-in-htaccess.html#using-allow-directive-in-apache" title="allow directive in apache htaccess">Using the Allow Directive in Apache htaccess</a> for more info.</p>
<pre>
Order deny,allow
Deny from all
Allow from 1.1.1.1
ErrorDocument 403 http://www.askapache.com
</pre>
<h2>Secure your remote shell with mod_rewrite and htaccess</h2>
<p>Based on the code from <a href="http://www.askapache.com/htaccess/htaccess-for-webmasters.html#redirect-except-1-ip-mod-rewrite" title="Apache htaccess tutorial">htaccess article</a>  This only allows access from user with IP of 1.1.1.1 and redirects everyone else.</p>
<pre>
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^1\.1\.1\.1
RewriteRule .* http://www.askapache.com [R=302,L]
</pre>
<p><a href="http://www.askapache.com/ajax/php-and-ajax-shell-console.html">PHP and AJAX shell console</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/ajax/php-and-ajax-shell-console.html/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Advanced Htaccess Demo/Example using Cookies, Headers, Rewrites</title>
		<link>http://www.askapache.com/htaccess/pdf-cookies-headers-rewrites.html</link>
		<comments>http://www.askapache.com/htaccess/pdf-cookies-headers-rewrites.html#comments</comments>
		<pubDate>Wed, 01 Apr 2009 03:07:53 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[htaccess rewrites]]></category>
		<category><![CDATA[http headers]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=2328</guid>
		<description><![CDATA[<p><a class="IFL" href="http://www.askapache.com/htaccess/pdf-cookies-headers-rewrites.html"><img src="/wp-content/uploads/2009/03/nsa-350x272.jpg" alt="Advanced Htaccess NSA" title="Advanced Htaccess NSA" width="350" height="272" /></a><strong>Whoa pretty sweet huh?</strong>  Bet you've never seen that before!  As I explain the htaccess code that achieves this, keep in mind this is merely one simple application for this code.  It's much more advanced than your basic htaccess trick, notice how this htaccess acts like a php script, very unusual..  I really wanted to share this trick after I created it for one of my clients because this is the tip of the iceberg.  Another use would be to display an alternate style sheet depending on a users theme preference.  The coolest thing about this example <acronym title="In My Humble Opinion">IMHO</acronym> is that it uses multiple advanced .htaccess ideas in order for it to work, most htaccess code on the net is very singular.  This code uses mod_headers to set the Content-Disposition header for forcing a download and uses mod_rewrite to do the rest.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="/wp-content/uploads/2009/03/nsa.jpg"><img src="/wp-content/uploads/2009/03/nsa-350x272.jpg" alt="Advanced Htaccess NSA" title="Advanced Htaccess NSA" width="350" height="272" /></a></p>
<p><strong>Welcome to the first generation of the new .htaccess tutorials/articles</strong>.  Basically these are articles detailing my BEST (almost) successful .htaccess experiments, meaning this is the only place on the net you&#8217;ll find this technique.  It&#8217;s home-grown .htaccess, and its some kush, good kush. Instead of just publishing my cryptic results and code in days past, whoah.. a working demo <em>and the NSA building</em>  <strong>;)</strong></p>
<p>Using the <a href="http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html">Mod_Rewrite Variables Cheatsheet</a> makes this example, and all advanced .htaccess code easier to understand.  Well, advanced for me at least.  I know alot of AskApache visitors are some of the top gurus in many IT fields, but mostly web developers or website owners like me..   This demo is pretty self-explanatory.. Try it out to see how simple of a task this <a href="http://www.askapache.com/htaccess/htaccess.html">.htaccess trick</a> performs.  And make sure you read the whole article as this htaccess technique can be used to do a heck of a lot more than this simple demo.</p>
<h2>Set PDF Viewing Mode</h2>
<div class="cnote">
<p id="pdfi" class="BTN FL"><span class="y"><span class="t"></span><span class="text">Inline</span></span><span class="b"><span></span></span></p>
<p id="pdfa" class="BTN FL"><span class="y"><span class="t"></span><span class="text">Download</span></span><span class="b"><span></span></span></p>
<p id="pdfs" class="BTN FL"><span class="y"><span class="t"></span><span class="text">Save As</span></span><span class="b"><span></span></span></p>
<p class="FL" style="margin-left:50px;"><kbd id="pdfr" style="border:2px solid #BFBFCC;padding:10px;line-height:1.1em;">Please make a selection, defaults to "Save As" mode.</kbd></p>
<p><br class="C" /><br />
<a style="font-size:1.2em;line-height:1.2em;width:22em;" class="BTN" href="http://www.askapache.com/storage/pdf/AskApache-Test.pdf"><span class="y"><span class="t"></span><span class="text">View PDF using selected mode &raquo;</span></span><span class="b"><span></span></span></a>
</div>
<p>Whoa pretty sweet huh?  Bet you&#8217;ve never seen that before!  As I explain the htaccess code that achieves this, keep in mind this is merely one simple application for this code.  It&#8217;s much more advanced than your basic htaccess trick, notice how this htaccess acts like a php script, very unusual..  I really wanted to share this trick after I created it for one of my clients because this is the tip of the iceberg.  Another use would be to display an alternate style sheet depending on a users theme preference.  The coolest thing about this example <acronym title="In My Humble Opinion">IMHO</acronym> is that it uses multiple advanced .htaccess ideas in order for it to work, most htaccess code on the net is very singular.  This code uses mod_headers to set the Content-Disposition header for forcing a download and uses mod_rewrite to:</p>
<ol>
<li>Send different Content-Type headers</li>
<li>Check the value of a cookie</li>
<li>Set environment variables for use later by mod_headers header directive</li>
</ol>
<h2>What&#8217;s Going On</h2>
<p>There are 3 different ways for a server to send a pdf file in response to a request for one.  This causes 3 different ways to open/view the pdf file in the clients browser.</p>
<ol>
<li>The browser display&#8217;s a <strong>&#8220;Save File As&#8221;</strong> dialog, allowing you to save the file or open.</li>
<li>The browser opens the pdf file <strong>&#8220;Inline&#8221;</strong>, opening the pdf file in the browser like a web page.</li>
<li>The browser &#8220;<strong>Downloads</strong>&#8221; the pdf file automatically as an &#8220;<strong>Attachment</strong>&#8221; and then causes an external pdf reader program like adobe reader to open the file.</li>
</ol>
<p>Some people prefer to have the option of saving the file to view later, some prefer opening it with an external program, and some just like the pdf file to load right in the browser&#8230;  The point is that by using .htaccess, we can let them choose any of the 3 methods and save their preference for all further pdf files requested from our site by that user.</p>
<h2>How It Works</h2>
<p>When you click on one of the 3 demo buttons above, &#8220;Inline&#8221;, &#8220;Save As&#8221;, or &#8220;Download&#8221;, a cookie named <code>askapache_pdf</code> is saved in your browser using the javascript below, with the value being set to which button you clicked.  Then when you request the pdf file the .htaccess code below uses mod_rewrite to read the value of the askapache_pdf cookie, and depending on which was your preference it will send alternate HTTP Headers that control how your browser handles the file.</p>
<h3>Htaccess Demo File</h3>
<p>For the demo I created the folder /storage/pdf/ and this is the .htaccess file at /storage/pdf/.htaccess</p>
<pre class='brushhtaccess'>
#
# The default Content-Type for .pdf files
# This will make .pdf files default Content-Type header have
# the value &#039;application/pdf&#039; - but the default can be overridden by
# using RewriteRule with the [T=&#039;different/type&#039;]
#
AddType application/pdf .pdf
&nbsp;
#
# Turn on the rewrite engine
# if its already on you dont need this
#
RewriteEngine On
&nbsp;
#
# Skip RewriteRules if not .pdf request, like autoindexing
# The next [2] RewriteRule directives are specific for .pdf files
# so if the filename requested does not end in .pdf
# then the [S=2] instructs the next 2 RewriteRule
# directives to be completely skipped
#
RewriteRule !.*\.pdf$ - [S=2]
&nbsp;
#
# The first RewriteCond checks to see if the askapache_pdf cookie
# is NOT set.  The second RewriteCond checks to see if the askapche_pdf
# cookie has the value of s, which is the value corresponding to
# someone clicking the "Save As" button.
#
# The [NC,OR] flag means that if the cookie askapache_pdf does not
# exist, OR (next cond) if the askapache_pdf cookie does exist and is set to &#039;s&#039;
# then process the RewriteRule.  If neither cond is true the rewriterule is skipped.
#
# If one of the RewriteCond is true, then the RewriteRule is processed.
# The RewriteRule applies to any/all requests (.*) but doesn&#039;t rewrite anything (-)
# This RewriteRule sets an Apache environment variable ASKAPACHE_PDFS to have the
# value of 1 if either rewritecond is true.  The variable can be checked by any directives
# following the rewriterule in the whole htaccess file.  The ASKAPACHE_PDFS ends in S
# because if this variable exists then it means the users preference is &#039;Save As&#039;
#
# Notice that if the user requested the pdf file without selecting a preference
# i.e. no cookie exists, then the ASKAPACHE_PDFS variable is still set.
# This just lets us pick the default preference for them, in this example the
# default is &#039;Save As&#039;
#
RewriteCond %{HTTP_COOKIE} !^.*askapache_pdf.*$ [NC,OR]
RewriteCond %{HTTP_COOKIE} ^.*askapache_pdf=s.*$ [NC]
RewriteRule .* - [E=ASKAPACHE_PDFS:1]
&nbsp;
#
# The RewriteCond checks the askapache_pdf cookie for the value &#039;a&#039;
# which &#039;a&#039; represents &#039;Download&#039;
#
# If the cookies value is &#039;a&#039; then the RewriteRule overrides the default
# Content-Type from &#039;application/pdf&#039; set with AddType earlier, to
# &#039;application/octet-stream&#039;, which is a special content-type that tells the browser
# that the file cannot be loaded by the browser &#039;Inline&#039;, but must be saved
# which will be opened by an external viewer depending on browser
#
RewriteCond %{HTTP_COOKIE} ^.*askapache_pdf=a.*$
RewriteRule .* - [T=application/octet-stream]
&nbsp;
#
# This is superfly.  If the cookie/users-preference was &#039;Save As&#039; (s)
# then the RewriteRule above the last one set the environment
# variable ASKAPACHE_PDFS to have the value 1.  The Header directive here
# is ONLY processed in that variable ASKAPACHE_PDFS exists.  That is what
# the end &#039;env=ASKAPACHE_PDFS&#039; does, it is the condition that must be met or
# the Header directive is skipped.
#
# If the ASKAPACHE_PDFS environment variable set by RewriteRule does exist
# then the header directive adds the header &#039;Content-Disposition: attachment&#039; to
# the normal Response Headers.  The &#039;Content-Disposition: attachment&#039; header
# instructs your browser to present you with the &#039;Save As&#039; dialog box
# allowing you to choose whether you want to save or open
#
Header set Content-Disposition "attachment" env=ASKAPACHE_PDFS
</pre>
<h3>Unique HTTP Headers Returned</h3>
<p>When it comes down to it, the following information is the 3 modes.  Notice each one is different, because these headers are the only thing controlling how your browser handles the file.</p>
<p>Save As Mode (askapache_pdf=s)</p>
<pre class='brushhtaccess'>
Content-Disposition: attachment
Content-Type: application/pdf
</pre>
<p>Inline Mode (askapache_pdf=i)</p>
<pre class='brushhtaccess'>
Content-Type: application/pdf
</pre>
<p>Download Mode (askapache_pdf=a)</p>
<pre class='brushhtaccess'>
Content-Type: application/octet-stream
</pre>
<h2>Javascript used by Demo</h2>
<p>The best place for javascript is quirksmode, here is a definitive article on setting, reading, parsing, etc.. <a title="I am a javascript cookie monster" href="http://www.quirksmode.org/js/cookies.html">COOKIES</a>.</p>
<pre>
  if(!gi(&#039;pdfr&#039;))return;
  var pdfr=gi(&#039;pdfr&#039;);
  var cval=getCookie(&#039;askapache_pdf&#039;);

  if(cval==&#039;i&#039;){pdfr.innerHTML=&#039;Currently set to "Inline".&#039;;}
  else if(cval==&#039;a&#039;){pdfr.innerHTML=&#039;Currently set to "Download" mode.&#039;;}
  else if(cval==&#039;s&#039;){pdfr.innerHTML=&#039;Currently set to "Save As" mode.&#039;;}
&nbsp;
  addMyEvent(gi(&#039;pdfi&#039;),"mousedown",function(){setCookie("askapache_pdf", "i", "", "/", "www.askapache.com"); gi(&#039;pdfr&#039;).innerHTML = &#039;Changed mode to "Inline".&#039;; return false; });
  addMyEvent(gi(&#039;pdfa&#039;),"mousedown",function(){setCookie("askapache_pdf", "a", "", "/", "www.askapache.com"); gi(&#039;pdfr&#039;).innerHTML = &#039;Changed mode to "Download".&#039;; return false; });
  addMyEvent(gi(&#039;pdfs&#039;),"mousedown",function(){setCookie("askapache_pdf", "s", "", "/", "www.askapache.com"); gi(&#039;pdfr&#039;).innerHTML = &#039;Changed mode to "Save As".&#039;; return false; });
</pre>
<hr class="C" />
<hr class="C" />
<h2>Alternative Method &#8211; No Cookies + PHP</h2>
<p>This is what I came up with first for my client, and then while programming the php I noticed.. Hey!  I think I can do the same thing using .htaccess, which would save me on cpu/memory/potential security/etc.. but this works great too.  Though you will need to hack the code to get it working probably..</p>
<p>Note that the .htaccess rewrite code I used here used FILENAME-i.pdf or FILENAME-s.pdf to pass the preference to the pdf-dl.php script, it also worked for FILENAME.pdf?i=i</p>
<h3>pdf-dl.php</h3>
<p><?php<br />
if (<br />
  !isset($_GET['file'])<br />
  || ($f=$_GET['file'])===false<br />
  || ($fp=@fopen($f,"rb"))===false<br />
  || ($fi=pathinfo($f))===false<br />
  || ($fi['fsize']=filesize($f))===false<br />
  || strtolower($fi["extension"])!='pdf'<br />
) die('Failed');</p>
<p>ob_start();<br />
header('Accept-Ranges: bytes');<br />
header("Content-Length: {$fi['fsize']}");<br />
header('Content-Type: application/pdf');<br />
if(!isset($_GET['i'])) header("Content-Disposition: attachment; filename=\"{$fi['basename']}\"");</p>
<p>$sent = 0;<br />
while ( !feof($fp) &#038;&#038; $sent < $fi['fsize'] &#038;&#038; ($buf = fread($fp, 8192)) != '' ){<br />
  echo $buf;<br />
  $sent += strlen($buf);<br />
  flush();<br />
  ob_flush();<br />
}<br />
fclose($fp);<br />
exit;<br />
?>
</pre>
<h3>Alternate Method .htaccess</h3>
<pre class='brushhtaccess'>
#
# Deny direct request to pdf-dl.php file
#
RewriteCond %{THE_REQUEST} ^.*pdf-dl\.php.*$ [NC]
RewriteRule .* - [F]
&nbsp;
#
# Handle PDF files named anything-i.pdf as inline
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ([^/]*)-i\.pdf$  /cgi-bin/pdf-dl.php?i=i&#038;file=%{DOCUMENT_ROOT}/storage/pdf/$1.pdf [L,NC,QSA,S=1]
&nbsp;
#
# Handle PDF files without -i.pdf as attachments
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ([^/]*)\.pdf$  /cgi-bin/pdf-dl.php?file=%{DOCUMENT_ROOT}/storage/pdf/$1.pdf [L,NC,QSA]
</pre>
<h2>More Info</h2>
<p>The following is more information about the Content-Dispositon header and related headers, and will make you an expert at this if you read it all.. (no thanks)</p>
<h3>Interesting Reading</h3>
<p>Here is the thread of the original draft proposal for the Content-Disposition header.</p>
<ul>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03620.html">Content-Disposition Header</a>, <em>Rens Troost - 22 Jun 1993</em>
<ul>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03629.html">Re: Content-Disposition Header</a>, <em>Nathaniel Borenstein</em>
<ul>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03630.html">Re: Content-Disposition Header</a>, <em>Gabe Beged-Dov</em>
<ul>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03631.html">Re: Content-Disposition Header</a>, <em>Rens Troost</em></li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03635.html">Re: Content-Disposition Header</a>, <em>Gabe Beged-Dov</em></li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03641.html">Content-Disposition Header and multipart/alternative</a>, <em>Rens Troost</em></li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03645.html">Re: Content-Disposition Header and multipart/alternative</a>, <em>Nathaniel Borenstein</em></li>
</ul>
</li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03632.html">Re: Content-Disposition Header</a>, <em>Keith Moore</em>
<ul>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03633.html">Re: Content-Disposition Header</a>, <em>Nathaniel Borenstein</em></li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03634.html">Re: Content-Disposition Header</a>, <em>Ed Levinson (Contractor)</em></li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03636.html">Re: Content-Disposition Header</a>, <em>Keith Moore</em></li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03640.html">Re: Content-Disposition Header</a>, <em>Rens Troost</em></li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03650.html">Re: Content-Disposition Header</a>, <em>Harald Tveit Alvestrand</em></li>
</ul>
</li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03621.html">Re: Content-Disposition Header</a>, <em>Steve Dorner</em>
<ul>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03622.html">Re: Content-Disposition Header</a>, <em>Rens Troost</em>
<ul>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03624.html">Re: Content-Disposition Header</a>, <em>Keith Moore</em></li>
</ul>
</li>
</ul>
</li>
<li><a href="http://www.imc.org/ietf-822/old-archive1/msg03652.html">Re: Content-Disposition Header</a>, <em>Carlyn M. Lowery</em></li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>Intense Reading</h3>
<ul>
<li><a href="http://www2.roguewave.com/support/docs/leif/sourcepro/html/protocolsug/10-1.html">Using the MIME Headers Effectively</a></li>
<li><a href="http://www.iana.org/assignments/mail-cont-disp">Mail Content Disposition Values and Parameters</a></li>
<li><cite><a href="http://rfc.askapache.com/rfc1766/rfc1766.txt">Tags for the Identification of Languages</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1436/rfc1436.txt">The Internet Gopher Protocol (a distributed document search and retrieval protocol)</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1630/rfc1630.txt">Universal Resource Identifiers in WWW</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1738/rfc1738.txt">Uniform Resource Locators (URL)</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1866/rfc1866.txt">Hypertext Markup Language - 2.0</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1945/rfc1945.txt">Hypertext Transfer Protocol -- HTTP/1.0</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2045/rfc2045.txt">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1123/rfc1123.txt">Requirements for Internet Hosts -- Communication Layers</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc822/rfc822.txt">Standard for The Format of ARPA Internet Text Messages</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1808/rfc1808.txt">Relative Uniform Resource Locators</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1036/rfc1036.txt">Standard for Interchange of USENET Messages</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc977/rfc977.txt">Network News Transfer Protocol</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2047/rfc2047.txt">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1867/rfc1867.txt">Form-based File Upload in HTML</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc821/rfc821.txt">Simple Mail Transfer Protocol</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1590/rfc1590.txt">Media Type Registration Procedure</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc959/rfc959.txt">File Transfer Protocol</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1700/rfc1700.txt">Assigned Numbers</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1737/rfc1737.txt">Functional Requirements for Uniform Resource Names</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1864/rfc1864.txt">The Content-MD5 Header Field</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1900/rfc1900.txt">Renumbering Needs Work</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1952/rfc1952.txt">GZIP file format specification version 4.3</a></cite></li>
<li><cite>Improving HTTP Latency</cite></li>
<li><cite><a href="http://www.isi.edu/touch/pubs/http-perf96/">Analysis of HTTP Performance</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1305/rfc1305.txt">Network Time Protocol (Version 3) Specification, Implementation and Analysis</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1951/rfc1951.txt">DEFLATE Compressed Data Format Specification version 1.3</a></cite></li>
<li><cite><a href="http://sunsite.unc.edu/mdma-release/http-prob.html">Analysis of HTTP Performance Problems,</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1950/rfc1950.txt">ZLIB Compressed Data Format Specification version 3.3</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2069/rfc2069.txt">An Extension to HTTP: Digest Access Authentication</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2068/rfc2068.txt">Hypertext Transfer Protocol -- HTTP/1.1</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2119/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc1806/rfc1806.txt">Communicating Presentation Information in Internet Messages: The Content-Disposition Header</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2145/rfc2145.txt">Use and Interpretation of HTTP Version Numbers</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2076/rfc2076.txt">Common Internet Message Headers</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2279/rfc2279.txt">UTF-8, a transformation format of Unicode and ISO-10646</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2046/rfc2046.txt">Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2277/rfc2277.txt">IETF Policy on Character Sets and Languages</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2396/rfc2396.txt">Uniform Resource Identifiers (URI): Generic Syntax and Semantics</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2617/rfc2617.txt">HTTP Authentication: Basic and Digest Access Authentication</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2110/rfc2110.txt">MIME E-mail Encapsulation of Aggregate Documents, such as HTML (MHTML)</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2026/rfc2026.txt">The Internet Standards Process -- Revision 3</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2324/rfc2324.txt">Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2049/rfc2049.txt">Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples</a></cite></li>
<li><cite><a href="http://rfc.askapache.com/rfc2183/rfc2183.txt">Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</a></cite></li>
</ul>
<p><a href="http://www.askapache.com/htaccess/pdf-cookies-headers-rewrites.html">Advanced Htaccess Demo/Example using Cookies, Headers, Rewrites</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/pdf-cookies-headers-rewrites.html/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>SEO Secrets of AskApache Part 2</title>
		<link>http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html</link>
		<comments>http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html#comments</comments>
		<pubDate>Fri, 17 Oct 2008 21:44:22 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Making Money]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[askapache]]></category>
		<category><![CDATA[Pagerank]]></category>
		<category><![CDATA[seo secrets]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=567</guid>
		<description><![CDATA[<p><a rel="lb" class="IFL hs hs31" href='http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html' title="Advanced SEO part 2: Search Engine Indexing and Pagerank Control"></a>This is part II of the <a href="http://www.askapache.com/seo/seo-secrets.html">Advanced SEO used on AskApache.com Series</a> and describes how to control which urls are indexed by Search Engines and how to move them higher up in Search Results.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.askapache.com/seo/seo-secrets.html">part I: SEO Secrets of AskApache.com</a> we talked about content and building a website to be your &#8220;SEO Base&#8221;.  This article discusses some advanced SEO concepts to get a site indexed, move your best pages higher in search results, and controlling the pagerank/seo-juice of your site.  but relatively easy ways to control and tweak WHAT urls on your site are indexed, and HOW.  I&#8217;ve heard some people refer to this as &#8220;controlling pagerank flow&#8221; and &#8220;controlling pagerank juice&#8221;, basically we want our best pages to rank higher in the search engine results.</p>
<p><strong>Big Picture:</strong> Going from no website to AskApache.com in less than a year can be accomplished by anyone with unique content and a resolve to avoid any shortcuts and take it one step at a time.</p>
<p class="cnote">We want what Google wants, to provide the most relevant content for someone who is doing a search.   Basically, you want every url on your site that has unique content to be included in the index.  In other words, <strong>you have to think like a search engine</strong>!</p>
<hr class="C" />
<h2>The Goal of Google</h2>
<p>Here&#8217;s what I mean, Google approaches search with the overwhelming goal of bringing the content to a searcher that is the most-likely to be what that searcher is searching for.  Another way of looking at it is something I read on Google&#8230;</p>
<blockquote cite="http://www.google.com/"><p>Google&#8217;s goal is to get you off of their site as fast as possible by providing you with exactly what you are looking for.</p></blockquote>
<hr class="C" />
<h2>Think about SEO like this</h2>
<p>If you search for <a href="http://www.google.com/search?aq=f&#038;complete=1&#038;hl=en&#038;q=htaccess+tutorial+for+seo&#038;btnG=Search" title="Google Search for htaccess tutorial for seo">htaccess tutorial for seo</a> on Google, would you be more likely to visit a <strong>tutorial about using .htaccess for seo</strong> or <strong>a category page for htaccess articles</strong>?  AskApache.com has both of those urls included in the index, but the article ranks higher than the category page, as it very well should.</p>
<hr class="C" />
<h2>Get Your URLS Indexed</h2>
<p>Before I explain how I am able to help Google and other search engines rank my article pages higher than my category pages, we need to get the urls in the index or nothing will show up.  There are many well-discussed methods for getting included in the index, so I&#8217;ll just list a few that I use.</p>
<ol>
<li>Provide High-Quality original content, people will link to it</li>
<li>Get a sitemap and use <a href="https://www.google.com/webmasters/tools/siteoverview?hl=en">Google Webmaster Tools</a></li>
<li>Publish an <a href="http://feeds.askapache.com/apache/htaccess">RSS/Atom Feed</a> and ping the net when you publish a post</li>
<li>Use robots.txt and robots meta tags</li>
</ol>
<h3>Your URLs in the index</h3>
<p>Here&#8217;s how to find out which of your pages are indexed.</p>
<ul>
<li>Indexed pages in your site: <a href="http://www.google.com/search?q=site:www.askapache.com">site:</a></li>
<li>Pages that link to your site&#8217;s front page: <a href="http://www.google.com/search?q=link:www.askapache.com">link:</a></li>
<li>The current cache of your site: <a href="http://www.google.com/search?q=cache:www.askapache.com">cache:</a></li>
<li>Information about your site: <a href="http://www.google.com/search?q=info:www.askapache.com">info:</a></li>
<li>Pages that are similar to your site: <a href="http://www.google.com/search?q=related:www.askapache.com">related:</a></li>
</ul>
<hr class="C" />
<h2>Break It Down</h2>
<p>Yo homeslice! I didn&#8217;t mean break dance..  I mean lets simplify AskApache in the context of getting our urls indexed high/low.  Here&#8217;s the stats:  <strong>1 Homepage, 206 Articles, 19 Pages, 31 Categories</strong></p>
<h3>1 Homepage</h3>
<p>This page is generally the highest ranking page in the index, it should contain links to your best urls, and provide easy navigation</p>
<h3>206 Specific Topic Articles</h3>
<p>These are the article&#8217;s (like this one) of AskApache.com and are the main source of search engine traffic.  You want each url (if its a good article) to be ranked as high as possible.  Some keys are to really make each article specific to a topic by using best-practice (X)HTML.</p>
<h3>19 Static Pages</h3>
<p>Most of these are pages like the online-tools hosted on this site, or other basic pages like about, contact us, site-map, etc..  Some of these you may want to rank very high ( like the /about/ page ) and some you may not want to even be included in the index.</p>
<h3>31 Specific Topic Category Pages</h3>
<p>These are tricky because they are generally just lists of articles from each category, which isn&#8217;t specific enough to get much seach-engine-traffic, but is very useful to site visitors.  I beefed up my category pages by adding additional information about the category topic in addition to excerpts of the articles.</p>
<hr class="C" />
<h2>Higher Pagerank = Higher Up in Search Results</h2>
<p>So Googlebot and other search engine robots have these crazy complicated algorithms (many patented) that SEO Industry types may get caught up in and try to technically analyze them.  I&#8217;m sure you&#8217;ve seen/read/heard the complicated advice that will always be pushed by many&#8230; advice like:</p>
<ul>
<li>analyze the number of words in the description/title/1st paragraph/etc.</li>
<li>Make sure your &#8220;keyword&#8221; is sprinkled throughout the text every 10-30th word..</li>
<li>Other equally unexciting technical analysis</li>
</ul>
<p>Now if you&#8217;ve had success with that then props to you, success is success, but I personally choose to completely ignore all that.  The number 1 thing that the top search engines advise is to design your page for a <strong>Human Visitor</strong>, not a computer.  The golden rule for me is how I would rank the page, not how some algorithm would.</p>
<hr class="C" />
<h2>Designing for a Human Visitor</h2>
<p>This is a major factor in your site being at the top vs. nowhere.   You design your HTML to be as minimal as possible (see source code for my homepage) and contain ONLY the neccessary elements.  Above all, use semantically sound XHTML markup.  (view source of <a href="http://www.w3.org/" title="World Wide Web Consortium"><acronym title="World Wide Web Consortium">W3C</acronym></a>)</p>
<h3>External CSS/Javascript</h3>
<p>Get your javascript and CSS out of your HTML and use external files (like this site) ALWAYS!  You should start with just the HTML, no css, no colors, no javascript, and THEN you add the .css and then you add the javascript.</p>
<h3>Site Accessibility</h3>
<p>Say your browser didn&#8217;t have a mouse, didn&#8217;t support images, css, javascript, or even colors!  Your HTML should be structured such that your page is still easily readable and easy to navigate.  You can use lynx, links, and many other terminal-based browsers to test for this&#8230; please see the <a href="http://www.w3.org/WAI/">Web Accessibility Initiative (<acronym title="Web Accessibility Initiative">WAI</acronym>)</a> for detailed info.</p>
<blockquote cite="http://en.wikipedia.org/wiki/Web_accessibility"><p><a href="http://en.wikipedia.org/wiki/Web_accessibility">Web accessibility</a> refers to the practice of making websites usable by people of all abilities and disabilities. When sites are correctly designed, developed and edited, all users can have equal access to information and functionality. For example, when a site is coded with semantically meaningful HTML, with textual equivalents provided for images and with links named meaningfully, this helps blind users using text-to-speech software and/or text-to-Braille hardware.</p>
</blockquote>
<hr class="C" />
<h2>Controlling a URL&#8217;s Pagerank</h2>
<p>A few tools and techniques are available for controlling the &#8220;juice&#8221; or &#8220;pagerank&#8221; of your urls.</p>
<ol>
<li>Robots.txt</li>
<li>Robots Meta Tags</li>
<li>Links</li>
</ol>
<h2>Robots.txt</h2>
<p>I&#8217;ve done quite a bit of research and experimentation with <a href="http://www.askapache.com/search/robots.txt">robots.txt files</a>, which is a file located in the root of your website at <a href="http://www.askapache.com/robots.txt">http://www.askapache.com/robots.txt</a> that is downloaded by all legitimate search engine spiders/bots and used as a Blacklist to prevent certain urls from being indexed.  Here are a few of the articles on this site, which you may skip if you like as they don&#8217;t illustrate the big-picture that I am going to discuss now.</p>
<ul>
<li><a href="http://www.askapache.com/seo/robotstxt-mattcutts-noindex.html">Control Flow of Pagerank with robots.txt and NoFollow, NoIndex</a></li>
<li><a href="http://www.askapache.com/seo/updated-robotstxt-for-wordpress.html">WordPress robots.txt</a></li>
<li><a href="http://www.askapache.com/seo/seo-with-robotstxt.html">SEO with Robots.txt</a></li>
<li><a href="http://www.askapache.com/google/adsense-robots.html">Google AdSense using robots.txt</a></li>
<li><a href="http://www.askapache.com/seo/wordpress-robotstxt-seo.html">WordPress robots.txt file optimized for SEO and Google</a></li>
</ul>
<h3>How To Use Robots.txt</h3>
<p>Even though robots.txt files are for whitelisting and blacklisting urls, I have found that they should only be used as an extreme form of blacklisting.  When you Disallow a url in your robots.txt file, that means most search engine bots won&#8217;t even LOOK at the url.  As you can see in the below example, I only disallow urls that shouldn&#8217;t ever be LOOKED at.  The real powertool is the <strong>robots meta tag</strong>.</p>
<pre>
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content
&nbsp;
Sitemap: http://www.askapache.com/sitemap.xml
</pre>
<hr class="C" />
<h2>Robots Meta Tag</h2>
<p>Ok I&#8217;m really trying to simplify, because what you should understand is the big-picture.  Every page can have a robots meta tag in the header, and this robots meta tag can tell the search-engine to index/not-index AND follow/not-follow.  Here are some examples:</p>
<pre>
&lt;meta name="robots" content="index" /&gt;
&lt;meta name="robots" content="noindex" /&gt;
&lt;meta name="robots" content="noindex,follow" /&gt;
&lt;meta name="robots" content="index,nofollow" /&gt;
</pre>
<h3>content=&#8221;index&#8221; / noindex</h3>
<p><code>index</code> means the search engine is free to index, archive, cache, and follow the page whereas <code>noindex</code> means DO NOT include this page in the search engine results.</p>
<h3>content=&#8221;follow&#8221; / nofollow</h3>
<p><code>follow</code> means the search engine is free to LOOK at the page and follow the links on the page whereas <code>nofollow</code> means DO NOT follow the links on the page.</p>
<hr class="C" />
<h3>WordPress Auto-Robots meta tag code</h3>
<p>Just add this to any plugin file and it will add the right robots meta tag to your site..  tweak to taste.</p>
<pre>
function askapache_robots_header(){
 global $wpdb;
&nbsp;
 $robot = &#039;&lt;meta name="robots" content="noindex,follow,nocache,noarchive" /&gt;&#039;;

 if ( is_paged() || is_search() || is_404() || is_author() || is_tag() )
   $robot = &#039;&lt;meta name="robots" content="noindex,follow" /&gt;&#039;;
 elseif ( is_home() || is_front_page() || is_single() )
   $robot = &#039;&lt;meta name="robots" content="follow,index" /&gt;&#039;;
 elseif ( is_category() || is_page() )
   $robot = &#039;&lt;meta name="robots" content="follow" /&gt;&#039;;
&nbsp;
 echo $robot . "\n";
}
add_action( &#039;wp_head&#039;, &#039;askapache_robots_header&#039; );
</pre>
<hr class="C" />
<h2>Links</h2>
<p>External and Internal Links are the crux of SEO.  It&#8217;s important to start FIRST on your Internal Links and linking structure&#8230; Once you are satisfied that the correct pages are indexed and ranked appropriately, then you can begin to look at external links.</p>
<ul>
<li>The fewer links on a page, generally the better.</li>
<li>If every page of your site points to the same url on your site, pagerank goes up from the number of internal links.</li>
<li>Use of the <code>rel</code>, <code>title</code>, <code>alt</code> attribute semantically is very helpful.  (next, prev, index)</li>
<li>Put your best links higher up in the XHTML, and put helpful/solid links at the end.</li>
<li>You can add <code>rel="nofollow"</code> to links that you dont want followed.</li>
</ul>
<p>The web has gotten to be so full of malicious/non-helpful SEO activity that I recommend developing your content NOT external links.  If you want to do this right and provide great content that makes search engine users happy and makes the web better, then explore this blog and develop content until the next article in this series, where I&#8217;ll show you how to <strong>make your site explode</strong>.</p>
<p class="anote">Stay tuned for Part III, which will dive deeper into the pipeworks of AskApache.com</p>
<p><a href="http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html">SEO Secrets of AskApache Part 2</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Top 3 Speed Tips for Sites using Google Analytics</title>
		<link>http://www.askapache.com/javascript/google-analytics-speed-tips.html</link>
		<comments>http://www.askapache.com/javascript/google-analytics-speed-tips.html#comments</comments>
		<pubDate>Fri, 17 Oct 2008 06:31:23 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[Google Analytics]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=1689</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/javascript/google-analytics-speed-tips.html" class="IFL" title="Tips for Sites using Google Analytics"><img src="http://z.askapache.com/i/google_analytics.gif" alt="Google Analytics" /></a>Top 3 ways to speed up websites that use Google Analytics.  Host Script Locally, Fix Google-Analytics Cookie Domain, and Failsafe Loading for optimum tracking statistics.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><img class="IFL" src="http://z.askapache.com/i/google_analytics.gif" alt="Google Analytics" />I&#8217;ve written alot about how I speed up websites, but there is much more to cover.  Here are the 3 ways I speed up my site by playing with the Google Analytics Tracking Code.<br class="C" /></p>
<ol>
<li><a href="http://www.askapache.com/javascript/google-analytics-speed-tips.html#googleanalyticshosting">Host the Google-Analytics ga.js file locally</a></li>
<li><a href="http://www.askapache.com/javascript/google-analytics-speed-tips.html#googleanalyticsdomain">Set Correct Cookie Domain</a></li>
<li><a href="http://www.askapache.com/javascript/google-analytics-speed-tips.html#googleanalyticsloading">Make Sure Google Analytics Loads</a></li>
</ol>
<h2><a id="googleanalyticsdefault">Default Google-Analytics Tracking Code</a></h2>
<pre>
&lt;script type="text/javascript"&gt;
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=&#039;" + gaJsHost + "google-analytics.com/ga.js&#039; type=&#039;text/javascript&#039;%3E%3C/script%3E"));
&lt;/script&gt;
&lt;script type="text/javascript"&gt;
var pageTracker = _gat._getTracker("UA-2452345-5");
pageTracker._trackPageview();
&lt;/script&gt;
</pre>
<hr class="C" />
<h2>1. <a id="googleanalyticshosting">Hosting the Google ga.js file locally</a></h2>
<p>Instead of calling the <a href="http://www.google-analytics.com/ga.js">http://www.google-analytics.com/ga.js</a> file in your site&#8217;s html, you can instead save the <code>ga.js</code> source code and serve it from on your own server!  This <strong>reduces DNS lookups</strong>, gives you <strong>control over caching</strong>, and if you combine the <code>ga.js</code> with a javascript file already on your site like I do, you <strong>reduce HTTP Requests</strong>, <strong>reduce browser cache lookups</strong>, etc.</p>
<p>For this site, I added the ga.js code to my http://z.askapache.com/z/j/apache-999.js file, then I <a href="http://www.askapache.com/tools/online-compression-tool-compares-packer-jsmin-dojo-and-yui-compressor.html">compressed it online</a> and saved to serve!</p>
<p class="anote"><strong>How to Do it: </strong><a href="http://www.askapache.com/javascript/serve-external-javascript-files-locally-for-increased-speed.html">Serve External Javascript Files locally for Increased Speed</a></p>
<hr class="C" />
<h2>2. <a id="googleanalyticsdomain">Set Correct Domain for Cookie</a></h2>
<p>For those websites who employ <a href="http://www.askapache.com/htaccess/apache-speed-subdomains.html">multiple sub-domains to serve static content</a>, and you are using the default google-analytics javascript code for website statistics, you may be able to get some speed by forcing the google analytics cookie to only be sent for your non-static subdomain.</p>
<p>I just noticed this on my site the other day while watching the wire:</p>
<p>The Google Analytics cookie was being set for the domain <code>.askapache.com</code> and so it was being sent needlessly with every request to every subdomain, when it only should be sent for requests to <code>www.askapache.com</code>.</p>
<h3>Specify Google-Analytics Cookie Domain</h3>
<p>So I googled for an answer for awhile and finally found the solution in the ga.js code itself.  There is a command called <code>_setDomainName</code> that lets you set the domain for the cookie.  The following code sets the GA cookie for <code>.www.askapache.com</code>, ensuring that the cookie will not be sent needlessly for images and other static content.</p>
<pre>
var pageTracker = _gat._getTracker("UA-732153-7");
pageTracker._setDomainName("www.askapache.com");
pageTracker._trackPageview();
</pre>
<hr class="C" />
<h2>3. <a id="googleanalyticsloading">Make Sure Google Analytics Loads</a></h2>
<p>Look at the source code for this page to see how I do it.  Here is what is going on:</p>
<ol>
<li>Add the google javascript at the bottom of my source code to make sure the HTML and DOM is fully loaded before first calling the script for download.</li>
<li>Check that the google-javascript is loaded by testing that the object called _gat exists, which is the internal object created.</li>
<li>Initiate google-analytics</li>
</ol>
<h3>The Safer Google-Analytics Include Code</h3>
<pre>
&lt;script type="text/javascript"&gt;
if (typeof(_gat) == "object") {
  var pageTracker = _gat._getTracker("UA-732153-7");
  pageTracker._setDomainName("www.askapache.com");
  pageTracker._initData();
  pageTracker._trackPageview();
}
&lt;/script&gt;
</pre>
<p><a href="http://www.askapache.com/javascript/google-analytics-speed-tips.html">Top 3 Speed Tips for Sites using Google Analytics</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/javascript/google-analytics-speed-tips.html/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Serve External Javascript Files locally for Increased Speed</title>
		<link>http://www.askapache.com/javascript/serve-external-javascript-files-locally-for-increased-speed.html</link>
		<comments>http://www.askapache.com/javascript/serve-external-javascript-files-locally-for-increased-speed.html#comments</comments>
		<pubDate>Wed, 01 Oct 2008 06:55:46 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=1542</guid>
		<description><![CDATA[<p><a class="IFL hs hs16" href="/wp-content/uploads/2008/10/google-external-javascript.png" title="Screenshot of bash shell script for downloading externally hosted javascript files"></a>One way I speed up AskApache.com is by downloading external third-party javascript files to host on my own server instead of externally.  In addition to the obvious speed boost, this lets you configure the caching and compression settings for the files.<br class="C" /></p>
]]></description>
			<content:encoded><![CDATA[<p><a class="IFL hs hs16" href="/wp-content/uploads/2008/10/google-external-javascript.png" title="Screenshot of bash shell script for downloading externally hosted javascript files"></a>One of the ways I speed up AskApache.com is by downloading all the external javascript files to my server and then serve them from my own server instead of the external site.  Currently I&#8217;m using this method to serve the <a href="http://www.google-analytics.com/ga.js">Google Analytics</a> javascript file, and the <a href="http://edge.quantserve.com/quant.js">Quantcast</a> javascript file.<br class="C" /></p>
<h2>Speed Benefit</h2>
<p>The speed benefit occurs because normally a site visitor has to perform a DNS query for both the google-analytics.com and quantcast.com servers, create a connection to each server, and then download the files.  By hosting these scripts on your own server you remove all the extra DNS queries, and by hosting all the files on your single server you enable advanced HTTP 1/1 protocol features like Pipelining the requests, which means a single connection for multiple files.</p>
<h2>Cache and Compression Control</h2>
<p>Serving these javascript files from your own server gives you complete control over the caching and compression settings of those files, which may not seem like a big deal&#8230; unless you know about the advanced caching and compression techniques available to make your site super-fast.</p>
<h3>Caching Control</h3>
<p>By using the <a href="http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html">mod_rewrite cache hack</a> like I do, you can make sure that a fresh version of the <code>.js file</code> is used by your visitors.</p>
<h3>Compression Control</h3>
<p>You can also specify advanced compression for these files, which could mean using Apache&#8217;s mod_deflate or mod_gzip modules, or you can even use a compression tool like Dojo&#8217;s Shrinksafe, Packer, JSMin, or YUICompressor to further compress the javascript files.</p>
<h2>Automated Downloading with Crontab</h2>
<p>Using crontab I tell my web server to run this shell script every day, to make sure I have updated versions of all the files.  Here&#8217;s the crontab entry I use to run this shell script every day.</p>
<pre>
@daily /bin/sh /home/cron-scripts/grab_javascripts.sh 2&gt;&#038;1 &&gt;/dev/null
</pre>
<h2>Shell Script to Download JS</h2>
<p>I created a simple Bash shell-script to download the javascript files.  All you need to do is modify the variables to save to your directory and send your site as the Referring URL and you are good to go.  You can add as many files as you want by adding them to the JSFILE array.</p>
<p>You can also download the shell-script: <a href='/wp-content/uploads/2008/10/grab_javascripts.sh'>grab_javascripts.sh</a></p>
<pre>
#!/bin/bash
# 2008-09-30
umask 022
VER="2.0"
&nbsp;
### Set as the referring url for downloads
SITE=http://www.askapache.com/
&nbsp;
### Directory to save the downloaded files
JSD=$HOME/j/
&nbsp;
### The files to download
JSFILE[0]=http://www.google-analytics.com/ga.js
&nbsp;
### run script with args to turn on debugging
[[ $# -ne 0 ]] &#038;&#038; set -o xtrace &#038;&#038; set -o verbose
&nbsp;
### SHELL OPTIONS
set +o noclobber # allowed to clobber files
set +o noglob # globbing on
set -e # abort on first error
shopt -s extglob
&nbsp;
#&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-#
# pt
#==-==-==-==-==-==-==-==-==-==-==#
function pt(){
  case ${1:-d} in
   i) echo -e "${C6}=&gt; ${C4}${2} ${C0}"; ;;
   m) echo -en "\n\n${C2}&gt;&gt;&gt; ${C4}${2} ${C0}\n\n"; ;;
   *) echo -e "\n${C8} DONE ${C0} \n"; ;;
  esac
}
&nbsp;
#=# CATCH SCRIPT KILLED BY USER
trap &#039;kill -9 $$&#039; SIGHUP SIGINT SIGTERM
&nbsp;
#=# MAKE MAIN SCRIPT NICE AS POSSIBLE SINCE IT DOESNT DO MUCH
renice 19 -p $$ &&gt;/dev/null
&nbsp;
#=# TURNS ON COLORING ONLY FOR TERMS THAT CAN SUPPORT IT
C="\033[";C0=;C1=;C2=;C3=;C4=;C5=;C6=;C7=;C8=;C9=;
  C0="${C}0m";C1="${C}1;30m";C2="${C}1;32m";C3="${C}0;32m";C4="${C}1;37m"
  C5="${C}0;36m";C6="${C}1;35m";C7="${C}0;37m";C8="${C}30;42m";C9="${C}1;36m";
clear
echo -e "${C1} __________________________________________________________________________ "
echo -e "| ${C2}             ___       __    ___                 __             ${C1}         |"
echo -e "| ${C2}            / _ | ___ / /__ / _ | ___  ___ _____/ /  ___        ${C1}         |"
echo -e "| ${C2}           / __ |(_-&lt;/  &#039;_// __ |/ _ \/ _ \`/ __/ _ \/ -_)       ${C1}         |"
echo -e "| ${C3}          /_/ |_/___/_/\_\/_/ |_/ .__/\_,_/\__/_//_/\__/        ${C1}         |"
echo -e "| ${C3}                               /_/                              ${C1}         |"
echo -e "|                                                                          |"
echo -e "|                 ${C4} LOCAL JAVASCRIPT FILES SCRIPT Version ${VER} ${C1}              |"
echo -e "${C1} __________________________________________________________________________ ${C0} \n\n"
&nbsp;
#=# BUILD INCOMING DIRS
[[ ! -d "${JSD}" ]] &#038;&#038; pt m "BUILDING DIRS" &#038;&#038; mkdir -p $JSD &&gt;/dev/null &#038;&#038; pt i "CREATED $JSD" &#038;&#038; pt
&nbsp;
#=# DOWNLOAD JAVASCRIPT FILES
cd $JSD &#038;&#038; pt m "DOWNLOADING JAVASCRIPT FILES"
for theurl in "${JSFILE[@]}"; do
pt i "${theurl}"
curl -m 60 &#45;-connect-timeout 10 &#45;-retry 10 &#45;-retry-delay 180 -s -S -L -e &#039;${SITE}&#039; -A &#039;Mozilla/5.0&#039; -O "${theurl}"
done
pt &#038;&#038; cd $OLDPWD
&nbsp;
######## curl options
# -S Show error. With -s, make curl show errors when they occur
# -s Silent mode. Don&#039;t output anything
# -e  Referer URL (H)
# -H &lt;line&gt; Custom header to pass to server (H)
# -L  Follow Location: hints (H)
# -A &lt;string&gt; User-Agent to send to server (H)
# -m &lt;seconds&gt; Maximum time allowed for the transfer
# &#45;-connect-timeout &lt;seconds&gt; Maximum time allowed for connection
# &#45;-globoff  Disable URL sequences and ranges using {} and []
# -O  Write output to a file named as the remote file
# &#45;-retry &lt;num&gt;  Retry request &lt;num&gt; times if transient problems occur
# &#45;-retry-delay &lt;seconds&gt; When retrying, wait this many seconds between each
# &#45;-retry-max-time &lt;seconds&gt; Retry only within this period
#############################################################################
&nbsp;
exit 0
</pre>
<p><a href="http://www.askapache.com/javascript/serve-external-javascript-files-locally-for-increased-speed.html">Serve External Javascript Files locally for Increased Speed</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/javascript/serve-external-javascript-files-locally-for-increased-speed.html/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Online Tool compares Packer, JSMin, Dojo, and YUI Compressor</title>
		<link>http://www.askapache.com/tools/online-compression-tool-compares-packer-jsmin-dojo-and-yui-compressor.html</link>
		<comments>http://www.askapache.com/tools/online-compression-tool-compares-packer-jsmin-dojo-and-yui-compressor.html#comments</comments>
		<pubDate>Sun, 14 Sep 2008 02:12:32 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Webmaster]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=1283</guid>
		<description><![CDATA[<p><a class="IFL hs hs22" href="http://www.askapache.com/tools/online-compression-tool-compares-packer-jsmin-dojo-and-yui-compressor.html" title="All Javascript should be compressed, obfuscated, cached, and optimized!"></a><br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p>I found this sweet online tool called CompressorRater that compresses javascript using all the top compression engines around, and it provides really detailed results..  Its a great example of an online tool as well..  <a href="http://arthurblake.wordpress.com/category/compressorrater/" title="on the authors blog">Discuss it</a>.</p>
<p>  Try it out a few times and see which compression engine works the best for you.. I&#8217;ve been compressing my javascript for years and It translates into much faster rendering and faster connections.   Automate it <a href="http://www.askapache.com/online-tools/js-compress/">like I do</a>.  I&#8217;ve used Dojo/Shrinksafe powered by <a href="http://www.mozilla.org/rhino/">Rhino</a>. for awhile, but its always nice to see if something else works better..  let me know what works the best for you guys.</p>
<hr class="C" />
<p><a href="http://compressorrater.thruhere.net/"><img src="/wp-content/uploads/2008/09/compressorrater-logo-white.png" alt="CompressorRater Logo" width="443" height="76" /></a></p>
<blockquote cite="http://compressorrater.thruhere.net/"><p><cite><a href="http://arthurblake.wordpress.com/">Arthur Blake</a></cite></p>
<p>There are many tools available that can help you compress your JavaScript code but it can be time consuming and difficult to analyze which tool works the best for a given situation. This web application shows aggregated statistics on the general level of compression in all these tools, and allows developers to easily play with and compare the different tools on their own JavaScript code without having to set up all the tools on their own.</p>
</blockquote>
<hr class="C" />
<h2>Javascript Input</h2>
<p><a href="/wp-content/uploads/2008/09/compressorrater-javascript1.png"><img src="/wp-content/uploads/2008/09/compressorrater-javascript1.png" alt="" title="compressorrater-javascript1" width="468" height="235" class="alignnone size-full wp-image-1293" /></a><br class="C" /></p>
<hr class="C" />
<h2>CompressorRator Output</h2>
<p><a href="/wp-content/uploads/2008/09/compress-results.png"><img src="/wp-content/uploads/2008/09/compress-results.png" alt="" title="compression-results" width="500" height="321" class="alignnone size-full wp-image-1299" /></a><br />
<br class="C" /></p>
<h2>Javascript Compression Options</h2>
<p>The following compression tools are compared, both with and without the affects of additional <a href="http://www.askapache.com/htaccess/apache-speed-compression.html" title="gzip compression">gzip compression</a> that are supported natively by modern web browsers.</p>
<ul>
<li><a href="http://crockford.com/javascript/jsmin" title="jsmin"><strong>JSMin</strong></a> is a conservative compressor, written several years ago by Douglas Crockford. It is considered safe (especially if you verify your code with <a href="http://jslint.com/" title="jsmin">JSLint</a> first&#8211; an excellent thing to do anyway) because it doesn&#8217;t attempt to change any variable names.</li>
<li><a href="http://dojotoolkit.org/docs/shrinksafe" title="shrinksafe"><strong>Dojo shrinksafe</strong></a> is a very popular Java based JavaScript compressor that parses the JavaScript using the <a href="http://www.mozilla.org/rhino/" title="rhino">rhino</a> library and crunches local variable names. </li>
<li><a href="http://dean.edwards.name/packer/" title="packer"><strong>Packer</strong></a> by Dean Edwards, is also a very popular JavaScript compressor, that can go beyond regular compression and also add advanced on-the-fly decompression with a JavaScript runtime piece.</li>
<li><a href="http://developer.yahoo.com/yui/compressor/" title="yuicompressor"><strong>YUI Compressor</strong></a> is a newer compressor written by Julien Lecomte, that aims to combine the safety of JSMin with the higher compression levels acheived by Dojo Shrinksafe.  Like Dojo shrinksafe, it is written in Java and based on the <a href="http://www.mozilla.org/rhino/" title="rhino">rhino</a> library.</li>
</ul>
<hr class="C" />
<p><a href="http://www.askapache.com/tools/online-compression-tool-compares-packer-jsmin-dojo-and-yui-compressor.html">Online Tool compares Packer, JSMin, Dojo, and YUI Compressor</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/tools/online-compression-tool-compares-packer-jsmin-dojo-and-yui-compressor.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEO Boost from Google 404 Plugin</title>
		<link>http://www.askapache.com/ajax/404-google-wordpress-plugin.html</link>
		<comments>http://www.askapache.com/ajax/404-google-wordpress-plugin.html#comments</comments>
		<pubDate>Tue, 01 Jul 2008 15:11:16 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Making Money]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.askapache.com/seo/404-google-wordpress-plugin.html</guid>
		<description><![CDATA[<p><a class="IFL hs hs33" href="http://www.askapache.com/google-seo-wordpress-yaHOO-robots" rel="nofollow" title="404 Not Found page using Google Ajax Search API"></a><strong>1 minute Install!</strong><br />Turns every 404 Not Found error into a SEO traffic generating event! Now you have many unique users with unique IP addresses and cookies searching your blog on all of the Google Indexes... <strong>Sweet!</strong><br /><br /><a href="http://www.askapache.com/google-wordpress-plugin-htaccess-robots-php-plugin.html?linux=bsd&#38;g=354" rel="nofollow">&#171;Take My 404 for a Test-Drive</a><br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aademo">Demo</a> | <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aadl">Download</a> | <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aai">Installation</a> | <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aaf">FAQ</a> | <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aass">Screenshots / Video</a></p>
<p><strong>AskApache Google 404</strong> is a <strong>must-have</strong> WordPress plugin that uses some ajax and a couple tricks to display a very helpful and SEO Error Page.  The default displays Google Search Results for <strong>images, news, blogs, videos, web, custom search engine, and your own site</strong>.<br class="C" /></p>
<p class="bnote"><strong>Updated:</strong>  01/26/2008<br /><strong>Install Time:</strong>   10 seconds to 5 minutes<br /><strong>Install Difficulty:</strong>   Super Easy</p>
<h2><a id="aademo"></a>Demo 404 Error Page</h2>
<p><a class="IFL hs hs33" href="http://www.askapache.com/google-seo-wordpress-yaHOO-robots" rel="nofollow" title="404 Not Found page using Google Ajax Search API">Click Image</a><br class="C" /></p>
<p class="anote"><strong>Heads Up:</strong>  I&#8217;ve been thinking about ways to improve this plugin for awhile now, and I&#8217;m going to be releasing an upgrade in the coming weeks!  Any specific feature requests let me know~</p>
<h2><a id="aadl"></a>Downloads</h2>
<div class="dlarea">
<div class="dlin">
<ol>
<li><a href="http://wordpress.org/extend/plugins/askapache-google-404/">askapache-google-404</a></li>
</ol>
</div>
</div>
<h2><a id="aai">404.php Installation</a></h2>
<ol>
<li>Upload <code>zip/tar.gz</code> file to the <code>/wp-content/plugins/</code> directory and unzip.</li>
<li>Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress.</li>
<li>Go to your Options Panel and open the &#8220;AA Google 404&#8243; submenu. <code>/wp-admin/options-general.php?page=askapache-google-404.php</code></li>
<li>Enter in your Google Search API Key and hit the &#8220;Update Key&#8221; Button. <a href="http://code.google.com/apis/ajaxsearch/signup.html">(Get One)</a></li>
<li>Add the code to your 404.php template page by including <code>&lt;?php if(function_exists(&#039;aa_google_404&#039;))aa_google_404();?&gt;</code> in your main content area.</li>
</ol>
<h2><a id="aaf"></a>Frequently Asked Questions</h2>
<p><strong>Do I need a Google Account?</strong></p>
<p>Yes.</p>
<p><strong>Do I need a 404.php template file?</strong></p>
<p>Only if you want to use this for your error page.</p>
<p><strong>My 404.php page isn&#8217;t being served for 404 Not Found errors!?</strong></p>
<p>Add <code>ErrorDocument 404 /index.php?error=404</code> to your .htaccess file.</p>
<p><strong>What is a Google API Key?</strong></p>
<p><a class="IFL" rel="lb" href='/wp-content/uploads/2007/09/aa-got-key.png' title='The Google Ajax API Key'><img src='/wp-content/uploads/2007/09/aa-got-key.thumbnail.png' alt='The Google Ajax API Key' /></a><br class="C" /></p>
<p><strong>How do I get a Google API Key?</strong></p>
<p><a class="IFL" rel="lb" href='/wp-content/uploads/2007/09/aa-get-key.png' title='Get Google API Key'><img src='/wp-content/uploads/2007/09/aa-get-key.thumbnail.png' alt='Get Google API Key' /></a><br class="C" /></p>
<h2><a id="aass"></a>Google 404 Screenshots</h2>
<p><span id="errorpage404" class="v601"><span class="load">Loading Video&#8230; <a href="http://f.askapache.com/mp4/">[dl]</a></span></span></p>
<p class="IFL"><strong>Plugin Configuration Panel</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-panel-preview1.png' title='AskApache Google 404 WordPress Plugin Configuration Panel'><img src='/wp-content/uploads/2007/09/aa-panel-preview1.thumbnail.png' alt='AskApache Google 404 WordPress Plugin Configuration Panel' /></a></p>
<p class="IFL"><strong>Search Entire Web</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-all-web.png' title='Search Entire Web with Google'><img src='/wp-content/uploads/2007/09/aa-404-all-web.thumbnail.png' alt='Search Entire Web with Google' /></a></p>
<p class="IFL"><strong>Search Blogs</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-blog-search.png' title='Search Blogs'><img src='/wp-content/uploads/2007/09/aa-404-blog-search.thumbnail.png' alt='Search Blogs' /></a></p>
<p class="IFL"><strong>Search Custom Search Engines</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-google-cse.png' title='Search Custom Search Engines'><img src='/wp-content/uploads/2007/09/aa-404-google-cse.thumbnail.png' alt='Search Custom Search Engines' /></a></p>
<p class="IFL"><strong>Search Images</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-image-search.png' title='Search Images'><img src='/wp-content/uploads/2007/09/aa-404-image-search.thumbnail.png' alt='Search Images' /></a></p>
<p class="IFL"><strong>Search Online Videos</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-video-search.png' title='Search Online Videos'><img src='/wp-content/uploads/2007/09/aa-404-video-search.thumbnail.png' alt='Search Online Videos' /></a></p>
<hr />
<h2>More Info from Google</h2>
<ul>
<li><a href="http://code.google.com/apis/ajaxsearch/">AJAX Search API</a></li>
<li><a href="http://code.google.com/apis/ajaxsearch/wizards.html">AJAX Search Wizards</a></li>
<li><a href="http://code.google.com/apis/ajaxsearch/documentation/">Developer Guide</a></li>
<li><a href="http://code.google.com/apis/ajaxsearch/samples.html">Code Samples</a></li>
<li><a href="http://code.google.com/apis/ajaxsearch/community-samples.html">Community Samples</a></li>
<li><a href="http://code.google.com/support/bin/topic.py?topic=10021">Knowledge Base</a></li>
<li><a href="http://googleajaxsearchapi.blogspot.com/">AJAX APIs Blog</a></li>
<li><a href="http://groups.google.com/group/Google-AJAX-Search-API">Developer Forum</a></li>
</ul>
<p><a href="http://www.askapache.com/ajax/404-google-wordpress-plugin.html">SEO Boost from Google 404 Plugin</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/ajax/404-google-wordpress-plugin.html/feed/</wfw:commentRss>
		<slash:comments>112</slash:comments>
		</item>
	</channel>
</rss>
