<?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>Solution Log &#124; Antonio David - NVNCBL &#187; double execute</title>
	<atom:link href="http://www.nvncbl.com/tagged/double-execute/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nvncbl.com</link>
	<description>A place to log my programming solutions for future reference</description>
	<lastBuildDate>Sun, 28 Aug 2011 01:20:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Script Double Run / Double Execute Phenomenon</title>
		<link>http://www.nvncbl.com/2009/10/script-double-run-double-execute-phenomenon/</link>
		<comments>http://www.nvncbl.com/2009/10/script-double-run-double-execute-phenomenon/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 20:05:29 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[double execute]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[img]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[src]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=458</guid>
		<description><![CDATA[I had a problem with your PHP code running or executing seemingly twice.  To debug this phenomenon, I put some write-to-file code at the beginning of the script.  Surprisingly, whenever I loaded my script in the browser, the file would be written to twice despite my one page load.
The problem was that The page I [...]]]></description>
			<content:encoded><![CDATA[<p>I had a problem with your PHP code running or executing seemingly twice.  To debug this phenomenon, I put some write-to-file code at the beginning of the script.  Surprisingly, whenever I loaded my script in the browser, the file would be written to twice despite my one page load.</p>
<p>The problem was that The page I was developing had an &lt;img&gt; in it with the &#8220;src&#8221; attribute set blank.  When the document was fully loaded, javascript was in place to dynamically assign the &#8220;src&#8221;.  This worked perfectly fine in the pre-server-side-logic stage of development so it was an easy decision to begin debugging server-side logic.</p>
<p>The double execute happens when Firefox sees &lt;img src=&#8221;" /&gt;.  Not knowing what source to assign, it sends a request (the second request) to the current path (again) for the image.  Therein lies the problem.  It&#8217;s interesting to note that Firefox is not to blame, as it&#8217;s following HTML specification.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/10/script-double-run-double-execute-phenomenon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

