<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: A Bookmarklet To Reload A Page&#8217;s CSS</title>
	<atom:link href="http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/</link>
	<description>My weblog</description>
	<lastBuildDate>Sat, 17 Dec 2011 15:07:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Paul Burney</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-42275</link>
		<dc:creator>Paul Burney</dc:creator>
		<pubDate>Sat, 17 Dec 2011 15:07:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-42275</guid>
		<description>This tip is so incredibly useful for developing JavaScript interactions since there isn&#039;t anything to do this in Firebug. Thank you very much for posting it!</description>
		<content:encoded><![CDATA[<p>This tip is so incredibly useful for developing JavaScript interactions since there isn&#8217;t anything to do this in Firebug. Thank you very much for posting it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-37771</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Sat, 04 Jun 2011 17:51:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-37771</guid>
		<description>I think you can just put any JS in a bookmarklet without any encoding. To share it with other people, encoding is probably helpful. There are online tools like this one to help out: http://ted.mielczarek.org/code/mozilla/bookmarklet.html</description>
		<content:encoded><![CDATA[<p>I think you can just put any JS in a bookmarklet without any encoding. To share it with other people, encoding is probably helpful. There are online tools like this one to help out: <a href="http://ted.mielczarek.org/code/mozilla/bookmarklet.html" rel="nofollow">http://ted.mielczarek.org/code/mozilla/bookmarklet.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-37616</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Thu, 02 Jun 2011 01:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-37616</guid>
		<description>Erik, this is very useful, thanks for the inspiration.

I did have a quick question for you though - what exactly do you need to do to convert the snippet of code into a usable bookmarklet?

It looks like its URL encoded, newlines removed, and wrapped in (function(){ ... })

Is that correct?  Is there anything else I need to do? 

I wanted to make a similar one for js files but I&#039;m having difficulty testing it and I don&#039;t know if its my code or the encoding.</description>
		<content:encoded><![CDATA[<p>Erik, this is very useful, thanks for the inspiration.</p>
<p>I did have a quick question for you though &#8211; what exactly do you need to do to convert the snippet of code into a usable bookmarklet?</p>
<p>It looks like its URL encoded, newlines removed, and wrapped in (function(){ &#8230; })</p>
<p>Is that correct?  Is there anything else I need to do? </p>
<p>I wanted to make a similar one for js files but I&#8217;m having difficulty testing it and I don&#8217;t know if its my code or the encoding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matted PC</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-36519</link>
		<dc:creator>Matted PC</dc:creator>
		<pubDate>Sat, 23 Apr 2011 07:16:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-36519</guid>
		<description>Frikin awesome...</description>
		<content:encoded><![CDATA[<p>Frikin awesome&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-30918</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Thu, 09 Dec 2010 19:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-30918</guid>
		<description>Thanks Josh!</description>
		<content:encoded><![CDATA[<p>Thanks Josh!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh L</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-30916</link>
		<dc:creator>Josh L</dc:creator>
		<pubDate>Thu, 09 Dec 2010 19:04:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-30916</guid>
		<description>Thanks for this bookmarklet, got me going in the right direction. Here is an improved version of the script (probably doesn&#039;t work in IE &lt;9):

var links = document.querySelectorAll(&#039;link[rel=&quot;stylesheet&quot;], link[href*=&quot;css&quot;]&#039;);

for( var i = 0; i &lt; links.length; i++ ){
	
	if( links[i].href.indexOf(&#039;?&#039;) === -1 ){
		
		links[i].href += &#039;?&#039;;
		
	}
	
	links[i].href += &#039;&amp;reloadcss=&#039; + Math.random();
	
}

In your original script, link elements without a &quot;rel&quot; attribute would be missed, and since it was just adding &quot;x&quot; on the end the reloads would be cached. This uses Math.random() so the reloaded CSS files are never cached.

Cheers!</description>
		<content:encoded><![CDATA[<p>Thanks for this bookmarklet, got me going in the right direction. Here is an improved version of the script (probably doesn&#8217;t work in IE &lt;9):</p>
<p>var links = document.querySelectorAll(&#039;link[rel=&quot;stylesheet&quot;], link[href*=&quot;css&quot;]&#039;);</p>
<p>for( var i = 0; i &lt; links.length; i++ ){</p>
<p>	if( links[i].href.indexOf(&#039;?&#039;) === -1 ){</p>
<p>		links[i].href += &#039;?&#039;;</p>
<p>	}</p>
<p>	links[i].href += &#039;&amp;reloadcss=&#039; + Math.random();</p>
<p>}</p>
<p>In your original script, link elements without a &quot;rel&quot; attribute would be missed, and since it was just adding &quot;x&quot; on the end the reloads would be cached. This uses Math.random() so the reloaded CSS files are never cached.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wouter Bos</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-26669</link>
		<dc:creator>Wouter Bos</dc:creator>
		<pubDate>Wed, 03 Mar 2010 08:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-26669</guid>
		<description>Works like a charm. Exactly what I was looking for.</description>
		<content:encoded><![CDATA[<p>Works like a charm. Exactly what I was looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lawrence Barsanti</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-25640</link>
		<dc:creator>Lawrence Barsanti</dc:creator>
		<pubDate>Fri, 22 Jan 2010 16:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-25640</guid>
		<description>Very useful.  Thanks.</description>
		<content:encoded><![CDATA[<p>Very useful.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Thomson</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-20084</link>
		<dc:creator>Brandon Thomson</dc:creator>
		<pubDate>Sat, 13 Jun 2009 13:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-20084</guid>
		<description>This is very useful, thanks very much... Actually I am surprised something like this is not in Firebug. I am using it to speed development of Conquer-on-Contact ;)</description>
		<content:encoded><![CDATA[<p>This is very useful, thanks very much&#8230; Actually I am surprised something like this is not in Firebug. I am using it to speed development of Conquer-on-Contact ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-16672</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Wed, 04 Mar 2009 20:10:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-16672</guid>
		<description>Very cool idea!
I had a problem with this when I first tried it because the page I was testing had link elements with a &quot;rel&quot; attribute of &quot;Stylesheet&quot; instead of &quot;stylesheet&quot; (or both actually). So I switched the 3rd line to:
  links[i].rel.toLowerCase() === &quot;stylesheet&quot;

And just a side note... I thought I&#039;d give a try to rewriting this using Prototype since all of the sites I work on include Prototype already (of course this is no longer a generic solution this way). Here&#039;s what I came up with:
  $$(&#039;link[rel=Stylesheet], link[rel=stylesheet]&#039;).each(function(link){link.href += (link.href.include(&#039;?&#039;) ? &#039;x&#039; : &#039;?x&#039;)});

Thanks again for the great idea!</description>
		<content:encoded><![CDATA[<p>Very cool idea!<br />
I had a problem with this when I first tried it because the page I was testing had link elements with a &#8220;rel&#8221; attribute of &#8220;Stylesheet&#8221; instead of &#8220;stylesheet&#8221; (or both actually). So I switched the 3rd line to:<br />
  links[i].rel.toLowerCase() === &#8220;stylesheet&#8221;</p>
<p>And just a side note&#8230; I thought I&#8217;d give a try to rewriting this using Prototype since all of the sites I work on include Prototype already (of course this is no longer a generic solution this way). Here&#8217;s what I came up with:<br />
  $$(&#8216;link[rel=Stylesheet], link[rel=stylesheet]&#8216;).each(function(link){link.href += (link.href.include(&#8216;?&#8217;) ? &#8216;x&#8217; : &#8216;?x&#8217;)});</p>
<p>Thanks again for the great idea!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: grosser</title>
		<link>http://www.eahanson.com/2009/02/28/a-bookmarklet-to-reload-a-pages-css/comment-page-1/#comment-16621</link>
		<dc:creator>grosser</dc:creator>
		<pubDate>Mon, 02 Mar 2009 21:00:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.eahanson.com/?p=62#comment-16621</guid>
		<description>simple + awesome, gotta try this tomorrow :)</description>
		<content:encoded><![CDATA[<p>simple + awesome, gotta try this tomorrow :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

