<?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/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Prevent Your CSS and JavaScript Files From Being&#160;Cached</title> <atom:link href="http://davidwalsh.name/prevent-cache/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/prevent-cache</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 02:40:12 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Nicolás</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-28023</link> <dc:creator>Nicolás</dc:creator> <pubDate>Thu, 22 Dec 2011 14:38:51 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-28023</guid> <description>Big up!Thanks for the tip.I was totally freak out with Chrome cache.Cheers.</description> <content:encoded><![CDATA[<p>Big up!</p><p>Thanks for the tip.</p><p>I was totally freak out with Chrome cache.</p><p>Cheers.</p> ]]></content:encoded> </item> <item><title>By: kash</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-24374</link> <dc:creator>kash</dc:creator> <pubDate>Thu, 09 Jun 2011 16:01:15 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-24374</guid> <description>the code didnt paste properly, its the 2nd code on top if this page.</description> <content:encoded><![CDATA[<p>the code didnt paste properly, its the 2nd code on top if this page.</p> ]]></content:encoded> </item> <item><title>By: kash</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-24373</link> <dc:creator>kash</dc:creator> <pubDate>Thu, 09 Jun 2011 15:58:42 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-24373</guid> <description>this is a great solution thanks, but, i dont understand how to implement it, if i just want to stop javascript from being cached do i just paste this somewhere on my site head or very top:
&lt;code&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;/site-script.js?&quot;&gt;&lt;code&gt;And, where on the code it says &#039;site-script.js&#039; -is that where i put the name of the javascript i want it to stop caching? and what are these numbers for: &quot;/site-script.js?1234567890&quot;?</description> <content:encoded><![CDATA[<p>this is a great solution thanks, but, i dont understand how to implement it, if i just want to stop javascript from being cached do i just paste this somewhere on my site head or very top:<br
/> <code><br
/> &lt;script type=&quot;text/javascript&quot; src=&quot;/site-script.js?"&gt;</p><p></code><code></p><p>And, where on the code it says 'site-script.js' -is that where i put the name of the javascript i want it to stop caching? and what are these numbers for: "/site-script.js?1234567890"?</code></p> ]]></content:encoded> </item> <item><title>By: John K. Njue</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-23450</link> <dc:creator>John K. Njue</dc:creator> <pubDate>Mon, 11 Apr 2011 04:45:26 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-23450</guid> <description>Man you&#039;ve really assisted me.Your solution is great.Keep up the good job.I am a young developer concentrating of PHP Ajax applications.I prefer to use JQuery Javascript framework.</description> <content:encoded><![CDATA[<p>Man you&#8217;ve really assisted me.</p><p>Your solution is great.</p><p>Keep up the good job.</p><p>I am a young developer concentrating of PHP Ajax applications.</p><p>I prefer to use JQuery Javascript framework.</p> ]]></content:encoded> </item> <item><title>By: Jason Arencibia</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-17381</link> <dc:creator>Jason Arencibia</dc:creator> <pubDate>Sun, 02 May 2010 10:11:03 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-17381</guid> <description>I know this is old, but I just found the site reading up on jQuery and mootools and since I&#039;m not the best with JS, I tend to have to change things a lot and caching can become an issue where your asking yourself did I upload that last change? loladding the query string to files might be a simple way, but I thought I&#039;d share what I have done! seems to work!I just turn all my javascript and css into php files and add this to the top of the file:then call it like this in the page header </description> <content:encoded><![CDATA[<p>I know this is old, but I just found the site reading up on jQuery and mootools and since I&#8217;m not the best with JS, I tend to have to change things a lot and caching can become an issue where your asking yourself did I upload that last change? lol</p><p>adding the query string to files might be a simple way, but I thought I&#8217;d share what I have done! seems to work!</p><p>I just turn all my javascript and css into php files and add this to the top of the file:</p><p>then call it like this in the page header</p> ]]></content:encoded> </item> <item><title>By: Permana Jayanta</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-8417</link> <dc:creator>Permana Jayanta</dc:creator> <pubDate>Wed, 25 Mar 2009 08:55:54 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-8417</guid> <description>So that&#039;s mean the string after ? on .css file ... i&#039;ve seen that on wordpress blog ...</description> <content:encoded><![CDATA[<p>So that&#8217;s mean the string after ? on .css file &#8230; i&#8217;ve seen that on wordpress blog &#8230;</p> ]]></content:encoded> </item> <item><title>By: Giorgio Sironi</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-8380</link> <dc:creator>Giorgio Sironi</dc:creator> <pubDate>Mon, 23 Mar 2009 17:44:57 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-8380</guid> <description>But why are you address the problem at php level? Apache (and all the servers that implements ETags) returns a 304 Not Modified http header if the file is old, and the correct response if file is modified (for Apache basing on modification date, inode, etc.).</description> <content:encoded><![CDATA[<p>But why are you address the problem at php level? Apache (and all the servers that implements ETags) returns a 304 Not Modified http header if the file is old, and the correct response if file is modified (for Apache basing on modification date, inode, etc.).</p> ]]></content:encoded> </item> <item><title>By: Nacho</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-8323</link> <dc:creator>Nacho</dc:creator> <pubDate>Thu, 19 Mar 2009 20:04:39 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-8323</guid> <description>You can go a step further by having a table with the MD5 of all your static content. Every time you make new changes, a script checks the MD5 of all files and if it changes, adds +1 to the version number.
then generate all URLs with a function that appends the version of this table to the filename so you dont have to do anything</description> <content:encoded><![CDATA[<p>You can go a step further by having a table with the MD5 of all your static content. Every time you make new changes, a script checks the MD5 of all files and if it changes, adds +1 to the version number.<br
/> then generate all URLs with a function that appends the version of this table to the filename so you dont have to do anything</p> ]]></content:encoded> </item> <item><title>By: Chris Hope</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-8321</link> <dc:creator>Chris Hope</dc:creator> <pubDate>Thu, 19 Mar 2009 17:59:21 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-8321</guid> <description>As I mentioned in an earlier comment, I was going to write a post about using rewrite rules etc. You can read it here: http://www.electrictoolbox.com/force-reload-css-javascript-unique-filenames/</description> <content:encoded><![CDATA[<p>As I mentioned in an earlier comment, I was going to write a post about using rewrite rules etc. You can read it here: <a
href="http://www.electrictoolbox.com/force-reload-css-javascript-unique-filenames/" rel="nofollow">http://www.electrictoolbox.com/force-reload-css-javascript-unique-filenames/</a></p> ]]></content:encoded> </item> <item><title>By: Chris Hope</title><link>http://davidwalsh.name/prevent-cache/comment-page-1#comment-8296</link> <dc:creator>Chris Hope</dc:creator> <pubDate>Wed, 18 Mar 2009 20:38:17 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1401#comment-8296</guid> <description>The catch with not caching JS or CSS at all is that the browser is going to have to download a copy of the file(s) every single time you load a page. This will slow requests down etc so it&#039;s better to use some other convention as other people have suggested here e.g. using a query string with the timestamp (which appears to be not particularly recommended due to proxy issues) or the version number in the filename.If you&#039;re going to make the browser download the CSS/JS every time then you may as well just include it in the page itself so only one request needs to be made per page.</description> <content:encoded><![CDATA[<p>The catch with not caching JS or CSS at all is that the browser is going to have to download a copy of the file(s) every single time you load a page. This will slow requests down etc so it&#8217;s better to use some other convention as other people have suggested here e.g. using a query string with the timestamp (which appears to be not particularly recommended due to proxy issues) or the version number in the filename.</p><p>If you&#8217;re going to make the browser download the CSS/JS every time then you may as well just include it in the page itself so only one request needs to be made per page.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/17 queries in 0.012 seconds using disk: basic
Object Caching 866/866 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 00:24:42 -->
