<?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: Keep session alive with Javascript</title>
	<atom:link href="http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/</link>
	<description>hot talk about web development</description>
	<lastBuildDate>Tue, 15 Dec 2009 23:52:27 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mato</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-11499</link>
		<dc:creator>Mato</dc:creator>
		<pubDate>Tue, 01 Dec 2009 10:33:45 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-11499</guid>
		<description>Here&#039;s a piece of PHP code, that I use to generate 1x1px jpeg image. You can use it with this Michal&#039;s JS to keep sessions alive in PHP environment.

$img = imagecreate( 1, 1 );
header( &quot;Content-type: image/jpeg&quot; );
imagejpeg($img);
imagedestroy($img);</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a piece of PHP code, that I use to generate 1&#215;1px jpeg image. You can use it with this Michal&#8217;s JS to keep sessions alive in PHP environment.</p>
<p>$img = imagecreate( 1, 1 );<br />
header( &#8220;Content-type: image/jpeg&#8221; );<br />
imagejpeg($img);<br />
imagedestroy($img);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davin Studer</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-11255</link>
		<dc:creator>Davin Studer</dc:creator>
		<pubDate>Wed, 21 Oct 2009 15:08:15 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-11255</guid>
		<description>@Jee Withmosty platforms you cannot just access an image to reset the session.  You need to access a page that will cause the server side scripting engine to reset the service.  So, you need to access a JSP file.  A way you could do it would be to swap the src of an image element with a JSP file that has a date/time stamp query string (to prevent caching).  That JSP file would binary read an image file and write it back to the browser with an image content type header.  If you are accessing the server side scripting engine that should reset your session.</description>
		<content:encoded><![CDATA[<p>@Jee Withmosty platforms you cannot just access an image to reset the session.  You need to access a page that will cause the server side scripting engine to reset the service.  So, you need to access a JSP file.  A way you could do it would be to swap the src of an image element with a JSP file that has a date/time stamp query string (to prevent caching).  That JSP file would binary read an image file and write it back to the browser with an image content type header.  If you are accessing the server side scripting engine that should reset your session.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jee</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-11253</link>
		<dc:creator>Jee</dc:creator>
		<pubDate>Wed, 21 Oct 2009 11:59:33 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-11253</guid>
		<description>How does this work with JSP/J2EE type application?
In my case i need to set the session alive after every 20mins(it is default session out), I tried to use the above mentioned logic and end up with fail.

I have the same scenario like user enters data into the form and take rest for a while(may be more than 20min), and when come back and enter more data try to save the doc, it shows the error saying timeout/some session out issue.

How to make it work without form submit(i.e., without reload) to server.

Thanks,
-Jee</description>
		<content:encoded><![CDATA[<p>How does this work with JSP/J2EE type application?<br />
In my case i need to set the session alive after every 20mins(it is default session out), I tried to use the above mentioned logic and end up with fail.</p>
<p>I have the same scenario like user enters data into the form and take rest for a while(may be more than 20min), and when come back and enter more data try to save the doc, it shows the error saying timeout/some session out issue.</p>
<p>How to make it work without form submit(i.e., without reload) to server.</p>
<p>Thanks,<br />
-Jee</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: troy</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-11010</link>
		<dc:creator>troy</dc:creator>
		<pubDate>Thu, 20 Aug 2009 09:11:44 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-11010</guid>
		<description>Hi, I have used your code it works in IE 8 ie : reload the image every time 

it works in local , in IE 8 and Mozilla , but not working in IE 7 .. and also 

if the project is moved to IIS - wwwroot Directory , you code has not work .. ???</description>
		<content:encoded><![CDATA[<p>Hi, I have used your code it works in IE 8 ie : reload the image every time </p>
<p>it works in local , in IE 8 and Mozilla , but not working in IE 7 .. and also </p>
<p>if the project is moved to IIS &#8211; wwwroot Directory , you code has not work .. ???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davin Studer</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-10923</link>
		<dc:creator>Davin Studer</dc:creator>
		<pubDate>Mon, 03 Aug 2009 16:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-10923</guid>
		<description>Session state is a function of the server side scripting engine, not the web server.  So, requesting just an image file will not work.  The request has to be passed to the server side scripting engine (i.e. ASP, PHP, ASP.Net, Python, etc.).</description>
		<content:encoded><![CDATA[<p>Session state is a function of the server side scripting engine, not the web server.  So, requesting just an image file will not work.  The request has to be passed to the server side scripting engine (i.e. ASP, PHP, ASP.Net, Python, etc.).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cocowool</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-10912</link>
		<dc:creator>cocowool</dc:creator>
		<pubDate>Sat, 01 Aug 2009 15:36:17 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-10912</guid>
		<description>i also failed with PHP on apache, i tried a .php file and it works
so i think request a static img file won&#039;t work, is that true?</description>
		<content:encoded><![CDATA[<p>i also failed with PHP on apache, i tried a .php file and it works<br />
so i think request a static img file won&#8217;t work, is that true?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davin Studer</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-9657</link>
		<dc:creator>Davin Studer</dc:creator>
		<pubDate>Wed, 28 Jan 2009 20:37:21 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-9657</guid>
		<description>I also do not think that this would work wiht ASP.Net or PHP on IIS.  You would have to use the method that I suggested except the for ASP.Net the file would have to be a aspx file that read the binary image data, and for php it would have to be a php file that does the same.</description>
		<content:encoded><![CDATA[<p>I also do not think that this would work wiht ASP.Net or PHP on IIS.  You would have to use the method that I suggested except the for ASP.Net the file would have to be a aspx file that read the binary image data, and for php it would have to be a php file that does the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davin Studer</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-9648</link>
		<dc:creator>Davin Studer</dc:creator>
		<pubDate>Tue, 20 Jan 2009 00:32:54 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-9648</guid>
		<description>One thing to note is that this will not work with IIS/ASP.  The session will not be renewed by simply requesting a .gif file.  You have to request an asp file.  So, a work around is to create a .asp file that binary reads a .gif file and then binary writes that data out to the request with the appropriate http headers.</description>
		<content:encoded><![CDATA[<p>One thing to note is that this will not work with IIS/ASP.  The session will not be renewed by simply requesting a .gif file.  You have to request an asp file.  So, a work around is to create a .asp file that binary reads a .gif file and then binary writes that data out to the request with the appropriate http headers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahesh k. Sharma</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-9635</link>
		<dc:creator>Mahesh k. Sharma</dc:creator>
		<pubDate>Tue, 06 Jan 2009 13:32:41 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-9635</guid>
		<description>This concept to live a page is very good. and with this i solved my problem with very efficent way.. thanks i think that it is very uniqe idea ... Thanks</description>
		<content:encoded><![CDATA[<p>This concept to live a page is very good. and with this i solved my problem with very efficent way.. thanks i think that it is very uniqe idea &#8230; Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Legion</title>
		<link>http://www.webdevbros.net/2006/12/14/keep-session-alive-with-javascript/#comment-9505</link>
		<dc:creator>Legion</dc:creator>
		<pubDate>Thu, 09 Oct 2008 21:18:40 +0000</pubDate>
		<guid isPermaLink="false">http://fabiankoehler.de/wdb/?p=12#comment-9505</guid>
		<description>i had same problem in asp.net, try using ajax to retrieve a page you know keeps the session alive like the main page of the site.</description>
		<content:encoded><![CDATA[<p>i had same problem in asp.net, try using ajax to retrieve a page you know keeps the session alive like the main page of the site.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
