<?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: Detecting when a page is loaded from the browser cache</title>
	<atom:link href="http://monket.net/blog/2010/02/detecting-when-a-page-is-loaded-from-the-browser-cache/feed/" rel="self" type="application/rss+xml" />
	<link>http://monket.net/blog/2010/02/detecting-when-a-page-is-loaded-from-the-browser-cache/</link>
	<description></description>
	<lastBuildDate>Mon, 13 Dec 2010 08:11:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Karl O&#39;Keeffe</title>
		<link>http://monket.net/blog/2010/02/detecting-when-a-page-is-loaded-from-the-browser-cache/comment-page-1/#comment-142</link>
		<dc:creator>Karl O&#39;Keeffe</dc:creator>
		<pubDate>Wed, 09 Jun 2010 09:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://monket.net/blog/?p=290#comment-142</guid>
		<description>Hi John,

Your server side PHP looks about right. 

If you are still having trouble getting this working try using a http debugging proxy such as Charles (http://www.charlesproxy.com/) to verify that the server is correctly sending the cookie.

Then use the Chrome Inspector panel (or something similar such as Firebug) to verify the state of the cookies, and requests made to the server within the browser. You should see that the cookie is set to false by the server, and then set to true by the jQuery code. When you return to that page using the back button, you should see in Charles that no new request has been made to the server and that the cookie is now set as true.

Let me know how you get on.</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>Your server side PHP looks about right. </p>
<p>If you are still having trouble getting this working try using a http debugging proxy such as Charles (<a href="http://www.charlesproxy.com/" rel="nofollow">http://www.charlesproxy.com/</a>) to verify that the server is correctly sending the cookie.</p>
<p>Then use the Chrome Inspector panel (or something similar such as Firebug) to verify the state of the cookies, and requests made to the server within the browser. You should see that the cookie is set to false by the server, and then set to true by the jQuery code. When you return to that page using the back button, you should see in Charles that no new request has been made to the server and that the cookie is now set as true.</p>
<p>Let me know how you get on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://monket.net/blog/2010/02/detecting-when-a-page-is-loaded-from-the-browser-cache/comment-page-1/#comment-141</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 08 Jun 2010 04:49:35 +0000</pubDate>
		<guid isPermaLink="false">http://monket.net/blog/?p=290#comment-141</guid>
		<description>ahh, here&#039;s the php.  Guess your blog didn&#039;t like my code tags:

/*
Makes the browser_cache_load cookie false if this page is loaded from the server 
****************************************/

setcookie(&#039;browser_cache_load&#039;,&#039;false&#039;);</description>
		<content:encoded><![CDATA[<p>ahh, here&#8217;s the php.  Guess your blog didn&#8217;t like my code tags:</p>
<p>/*<br />
Makes the browser_cache_load cookie false if this page is loaded from the server<br />
****************************************/</p>
<p>setcookie(&#8216;browser_cache_load&#8217;,'false&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://monket.net/blog/2010/02/detecting-when-a-page-is-loaded-from-the-browser-cache/comment-page-1/#comment-140</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 08 Jun 2010 04:47:02 +0000</pubDate>
		<guid isPermaLink="false">http://monket.net/blog/?p=290#comment-140</guid>
		<description>Hi there, thanks for the info.  I&#039;m trying to use this method using php for one page of site.  It&#039;s a portfolio page that is loaded with big images and a bunch of snazzy javaScript.  When the user first visits the page (which is the home page) I&#039;m showing some longer text to entertain them while all the images load.  Once the images are loaded the text fades out and the gallery is shown.  

If the page has already been cached, then I&#039;m just showing a quick &quot;Images Loading...&quot; message because it only takes a few seconds and having a large text block flash in and out quickly is confusing to the user.  

Anyway, I&#039;m good on the javaScript/jQuery but I&#039;m confused by the server-side code above (.NET?).  I have the following php at the top of my page but I feel like I&#039;m missing something that confirms a response from the server: 

&lt;code&gt;



&lt;/code&gt;

Your help is appreciated!  I&#039;ve spent a few hours trying to figure this out with no luck. 

Thanks, 
John</description>
		<content:encoded><![CDATA[<p>Hi there, thanks for the info.  I&#8217;m trying to use this method using php for one page of site.  It&#8217;s a portfolio page that is loaded with big images and a bunch of snazzy javaScript.  When the user first visits the page (which is the home page) I&#8217;m showing some longer text to entertain them while all the images load.  Once the images are loaded the text fades out and the gallery is shown.  </p>
<p>If the page has already been cached, then I&#8217;m just showing a quick &#8220;Images Loading&#8230;&#8221; message because it only takes a few seconds and having a large text block flash in and out quickly is confusing to the user.  </p>
<p>Anyway, I&#8217;m good on the javaScript/jQuery but I&#8217;m confused by the server-side code above (.NET?).  I have the following php at the top of my page but I feel like I&#8217;m missing something that confirms a response from the server: </p>
<p><code></p>
<p></code></p>
<p>Your help is appreciated!  I&#8217;ve spent a few hours trying to figure this out with no luck. </p>
<p>Thanks,<br />
John</p>
]]></content:encoded>
	</item>
</channel>
</rss>

