<?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: window.resize firing frequency in browsers</title>
	<atom:link href="http://almaer.com/blog/windowresize-firing-frequency/feed" rel="self" type="application/rss+xml" />
	<link>http://almaer.com/blog/windowresize-firing-frequency</link>
	<description>blogging about life, the universe, and everything tech</description>
	<lastBuildDate>Sat, 08 Sep 2012 07:06:53 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: gotit</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40241</link>
		<dc:creator>gotit</dc:creator>
		<pubDate>Fri, 09 Jan 2009 14:30:37 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40241</guid>
		<description>I was reading your conversation hoping to find a solution to my problem
I&#039;m using a table with 3 cells - left cell positioned at 50% of page height &amp; right one at 50%. The side cells have their heights set to match the upper or lower  border of the middle cell. When I resize the browser all goes well as long as the browser inner height is an integer value eg 15 or 347 but when the browser height is a float eg: 15.5 or 347.5, my side cell&#039;s heights are set 1 px  to low.
I was hoping to solve this with window.onresize in javascript but it is firing to many times to be reliable. Do you guys know how to deal with this issue in different browsers?
I&#039;m just a beginner using VS2005 to get this job done. Thanks in advance and kind regards to you all.
Jacek</description>
		<content:encoded><![CDATA[<p>I was reading your conversation hoping to find a solution to my problem<br />
I&#8217;m using a table with 3 cells &#8211; left cell positioned at 50% of page height &amp; right one at 50%. The side cells have their heights set to match the upper or lower  border of the middle cell. When I resize the browser all goes well as long as the browser inner height is an integer value eg 15 or 347 but when the browser height is a float eg: 15.5 or 347.5, my side cell&#8217;s heights are set 1 px  to low.<br />
I was hoping to solve this with window.onresize in javascript but it is firing to many times to be reliable. Do you guys know how to deal with this issue in different browsers?<br />
I&#8217;m just a beginner using VS2005 to get this job done. Thanks in advance and kind regards to you all.<br />
Jacek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucent</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40231</link>
		<dc:creator>Lucent</dc:creator>
		<pubDate>Wed, 07 Jan 2009 21:53:50 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40231</guid>
		<description>Was the app you were playing with ptable.com?</description>
		<content:encoded><![CDATA[<p>Was the app you were playing with ptable.com?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: td</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40211</link>
		<dc:creator>td</dc:creator>
		<pubDate>Sun, 04 Jan 2009 15:40:30 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40211</guid>
		<description>https://bugzilla.mozilla.org/show_bug.cgi?id=114649</description>
		<content:encoded><![CDATA[<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=114649" rel="nofollow">https://bugzilla.mozilla.org/show_bug.cgi?id=114649</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pd</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40205</link>
		<dc:creator>pd</dc:creator>
		<pubDate>Sat, 03 Jan 2009 11:35:24 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40205</guid>
		<description>https://bugzilla.mozilla.org/show_bug.cgi?id=114649</description>
		<content:encoded><![CDATA[<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=114649" rel="nofollow">https://bugzilla.mozilla.org/show_bug.cgi?id=114649</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sachin</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40198</link>
		<dc:creator>Sachin</dc:creator>
		<pubDate>Fri, 02 Jan 2009 11:41:45 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40198</guid>
		<description>I too noticed this issue some time back</description>
		<content:encoded><![CDATA[<p>I too noticed this issue some time back</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pd</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40194</link>
		<dc:creator>pd</dc:creator>
		<pubDate>Thu, 01 Jan 2009 09:21:54 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40194</guid>
		<description>I raised a query about Firefox&#039;s resize behaviour a while back. At the time I cared how the resize event behaved. Now I don&#039;t care, I just want it consistent with other browsers, whether those other browsers are &#039;broken&#039; or not.</description>
		<content:encoded><![CDATA[<p>I raised a query about Firefox&#8217;s resize behaviour a while back. At the time I cared how the resize event behaved. Now I don&#8217;t care, I just want it consistent with other browsers, whether those other browsers are &#8216;broken&#8217; or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nobody</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40188</link>
		<dc:creator>nobody</dc:creator>
		<pubDate>Wed, 31 Dec 2008 21:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40188</guid>
		<description>https://bugzilla.mozilla.org/show_bug.cgi?id=114649</description>
		<content:encoded><![CDATA[<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=114649" rel="nofollow">https://bugzilla.mozilla.org/show_bug.cgi?id=114649</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40185</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Wed, 31 Dec 2008 20:37:10 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40185</guid>
		<description>Weren&#039;t there some recent changes to this?
I just can remember if they were 3.0 recent or 3.1 recent...</description>
		<content:encoded><![CDATA[<p>Weren&#8217;t there some recent changes to this?<br />
I just can remember if they were 3.0 recent or 3.1 recent&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Simpson</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40184</link>
		<dc:creator>Kyle Simpson</dc:creator>
		<pubDate>Wed, 31 Dec 2008 19:31:19 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40184</guid>
		<description>FYI-the more I study FF&#039;s particular behavior, the more I think it&#039;s NOT the same queuing that is clearly evident in Opera. It might still be the case, but in Opera a *first* onresize does happen right away, which gets the collecting of &quot;r&quot; chars started so that as the continous motion occurs, the &quot;r&quot; chars build up.  But with FF, that first onresize event doesn&#039;t happen, so the 3-6 chars that DO show getting built up occur between the one ending resize event and the time (~50ms later) that I turn off the interval listener. So, for FF, this is probably not the queuing that Opera shows, as I suggested above. 

NOTE: It may still be underlying a behavior that exists, but the construction of my my test masks it for FF since that first onresize never occurs.

Sorry if my original post is off-target or misleading, but was hoping it might trigger some thought toward an appropriate solution for FF.</description>
		<content:encoded><![CDATA[<p>FYI-the more I study FF&#8217;s particular behavior, the more I think it&#8217;s NOT the same queuing that is clearly evident in Opera. It might still be the case, but in Opera a *first* onresize does happen right away, which gets the collecting of &#8220;r&#8221; chars started so that as the continous motion occurs, the &#8220;r&#8221; chars build up.  But with FF, that first onresize event doesn&#8217;t happen, so the 3-6 chars that DO show getting built up occur between the one ending resize event and the time (~50ms later) that I turn off the interval listener. So, for FF, this is probably not the queuing that Opera shows, as I suggested above. </p>
<p>NOTE: It may still be underlying a behavior that exists, but the construction of my my test masks it for FF since that first onresize never occurs.</p>
<p>Sorry if my original post is off-target or misleading, but was hoping it might trigger some thought toward an appropriate solution for FF.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle Simpson</title>
		<link>http://almaer.com/blog/windowresize-firing-frequency/comment-page-1#comment-40183</link>
		<dc:creator>Kyle Simpson</dc:creator>
		<pubDate>Wed, 31 Dec 2008 19:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2229#comment-40183</guid>
		<description>I&#039;ve filed a couple of related bugs about this with Opera before (in fact, I mentioned that the behavior found was similar to that of FF!). Still no response from them, several months later.

I sure hope that maybe FF will address it at some point. I agree it&#039;s quite annoying to not have the ability to rely on this event reliably between browsers.

-----------------
To be more specific on the bug I filed, as it may have some relation to FF&#039;s behavior:  one workaround that is sometimes attempted is to have a quickly-executing interval (say, 35ms) which fires &quot;continuously&quot;, starting with the first onresize event, and ending some time (like 500ms) after the &quot;last&quot; onresize event, and accomplishing the same thing, or at least hoping to.

The problem is that Opera seems to queue up events (including timer events, and onresize events) while a continuous resize motion is happening, and only let them happen when it gets some breathing room with a brief pause in the resize motion. So, at least for Opera, neither the resize event, nor a continuously firing interval, can achieve the continuous reflow behavior that is desired.

I mention all this to say, perhaps FF is doing something similar, not specifically waiting for 1 second, but merely just queuing up resize events to be executed when a brief (even few ms) pause in the motion of a user resizing the browser occurs.  In my testing, it seemed this brief pause can even occur in the short interval of time it takes to change direction with one&#039;s mouse (from dragging the window bigger, to dragging it smaller). That few ms seems to be long enough for the browser to let some of those queued up events go ahead and execute.

And btw, the way I know the events are queued up is that I set up a test to see if there&#039;s only one resize/interval event at the end, or several stacked up and later executed all on top of each other -- it was clear from this test there were a bunch stacked up waiting to go out.  That test link I set up (for the opera bug report) is here, and may be similarly useful for looking at (and fixing!?) FF&#039;s behavior:

http://getify.com/infobox/test-opera-resize.html

Now, when I try this in Opera vs FF3, I do get different behavior... In Opera, the longer I do a continuous resizing, the more &quot;r&quot; characters will eventually get printed, with a single &quot;*&quot; being printed when the end of the interval hooking occurs.  In FF, the number of &quot;r&quot; characters seems to vary only slightly with short or prolonged continuous resizing, sometimes 3, 4, 5 or 6 &quot;r&quot; chars at most. 

But notice that the &quot;r&quot; characters never get shown until you &quot;pause&quot; in your movement... if you keep smoothly moving the &quot;r&quot; chars don&#039;t get shown.  This suggests the queuing I am referring to. But it does appear that FF limits the number of events in that &quot;queue&quot; to 5 or 6, whereas you can easily with opera build up 20 or 30 in that queue.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve filed a couple of related bugs about this with Opera before (in fact, I mentioned that the behavior found was similar to that of FF!). Still no response from them, several months later.</p>
<p>I sure hope that maybe FF will address it at some point. I agree it&#8217;s quite annoying to not have the ability to rely on this event reliably between browsers.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
To be more specific on the bug I filed, as it may have some relation to FF&#8217;s behavior:  one workaround that is sometimes attempted is to have a quickly-executing interval (say, 35ms) which fires &#8220;continuously&#8221;, starting with the first onresize event, and ending some time (like 500ms) after the &#8220;last&#8221; onresize event, and accomplishing the same thing, or at least hoping to.</p>
<p>The problem is that Opera seems to queue up events (including timer events, and onresize events) while a continuous resize motion is happening, and only let them happen when it gets some breathing room with a brief pause in the resize motion. So, at least for Opera, neither the resize event, nor a continuously firing interval, can achieve the continuous reflow behavior that is desired.</p>
<p>I mention all this to say, perhaps FF is doing something similar, not specifically waiting for 1 second, but merely just queuing up resize events to be executed when a brief (even few ms) pause in the motion of a user resizing the browser occurs.  In my testing, it seemed this brief pause can even occur in the short interval of time it takes to change direction with one&#8217;s mouse (from dragging the window bigger, to dragging it smaller). That few ms seems to be long enough for the browser to let some of those queued up events go ahead and execute.</p>
<p>And btw, the way I know the events are queued up is that I set up a test to see if there&#8217;s only one resize/interval event at the end, or several stacked up and later executed all on top of each other &#8212; it was clear from this test there were a bunch stacked up waiting to go out.  That test link I set up (for the opera bug report) is here, and may be similarly useful for looking at (and fixing!?) FF&#8217;s behavior:</p>
<p><a href="http://getify.com/infobox/test-opera-resize.html" rel="nofollow">http://getify.com/infobox/test-opera-resize.html</a></p>
<p>Now, when I try this in Opera vs FF3, I do get different behavior&#8230; In Opera, the longer I do a continuous resizing, the more &#8220;r&#8221; characters will eventually get printed, with a single &#8220;*&#8221; being printed when the end of the interval hooking occurs.  In FF, the number of &#8220;r&#8221; characters seems to vary only slightly with short or prolonged continuous resizing, sometimes 3, 4, 5 or 6 &#8220;r&#8221; chars at most. </p>
<p>But notice that the &#8220;r&#8221; characters never get shown until you &#8220;pause&#8221; in your movement&#8230; if you keep smoothly moving the &#8220;r&#8221; chars don&#8217;t get shown.  This suggests the queuing I am referring to. But it does appear that FF limits the number of events in that &#8220;queue&#8221; to 5 or 6, whereas you can easily with opera build up 20 or 30 in that queue.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
