<?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>Ben Huson &#187; JavaScript</title>
	<atom:link href="http://www.benhuson.co.uk/category/web_developer/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benhuson.co.uk</link>
	<description>Web Designer and Developer</description>
	<lastBuildDate>Mon, 06 Feb 2012 14:41:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>FancyBox causing hanging in Internet Explorer</title>
		<link>http://www.benhuson.co.uk/2010/10/29/fancybox-hanging-in-ie/</link>
		<comments>http://www.benhuson.co.uk/2010/10/29/fancybox-hanging-in-ie/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 21:33:10 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[FancyBox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[lightBox]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=2008</guid>
		<description><![CDATA[Tweet I recently received feedback from people saying that some web sites I had worked on were loading slowly and freezing for a second or two in Internet Explorer on each page load. After checking that images were well optimised I guessed the next thing to check should be any JavaScript the pages were loading. [...]]]></description>
			<content:encoded><![CDATA[
<!-- This is the start of the WP Twitter Button code -->
<div id="rk_wp_twitter_button" style="margin: 0px 0px 0px 0px; float: left"><a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Ftwitter.com%2Fshare&sref=rss" class="twitter-share-button" data-url="http://www.benhuson.co.uk/2010/10/29/fancybox-hanging-in-ie/" data-count="horizontal" data-via="benhuson">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
<!-- This is the end of the WP Twitter Button code -->

 
<span class = "facebook-like" style = "height: 25px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.benhuson.co.uk/2010/10/29/fancybox-hanging-in-ie/&layout=button_count&send=false&show_faces=false&width=&action=like&colorscheme=light&font=lucida grande" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:25px"></iframe></span><p><img class="alignnone size-medium wp-image-2010 border" title="FancyBox Hanging in Internet Explorer" src="http://www.benhuson.co.uk/wp-content/uploads/fancybox-400x250.jpg" alt="" width="400" height="250" /></p>
<p><strong>I recently received feedback from people saying that some web sites I had worked on were loading slowly and freezing for a second or two in Internet Explorer on each page load.</strong></p>
<p>After checking that images were well optimised I guessed the next thing to check should be any JavaScript the pages were loading.</p>
<p>I removed all JavaScript includes and the pages loaded fine so I added them in again until I was able to re-create the &#8216;hanging&#8217; issue &#8211; <a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Ffancybox.net%2F&sref=rss">FancyBox</a> seemed to be the culprit.</p>
<p>I&#8217;ve not yet figured out why, but the hang appears to happen around the same time that the HTML DOM structure finishes loading. During the &#8216;freeze&#8217; the browser hangs completely and you cannot click any links, scroll, or interact with the page in any way.</p>
<p>The hang even happens when viewing the FancyBox web site in IE although is it for a much shorter period of time &#8211; maybe the duration of the hand is influence but the amount of HTML or links on a page?</p>
<p>As I don&#8217;t have enough time to investigate further, for the moment I shall continue to use <a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Fleandrovieira.com%2Fprojects%2Fjquery%2Flightbox%2F&sref=rss">jQuery lightBox</a> or one of the other image popup scripts. Shame, as FancyBox is the nicest and cleanest I have found so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2010/10/29/fancybox-hanging-in-ie/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>JavaScript moveTo(0, 0) not working in FireFox OS X</title>
		<link>http://www.benhuson.co.uk/2010/01/15/javascript-moveto0-0-in-firefox-os-x-not-working/</link>
		<comments>http://www.benhuson.co.uk/2010/01/15/javascript-moveto0-0-in-firefox-os-x-not-working/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 20:37:30 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1313</guid>
		<description><![CDATA[Tweet Here&#8217;s a weird JavaScript FireFox bug&#8230; In OS X, for some reason the following javascript was not positioning the FireFox browser window to the top left of the screen. window.moveTo&#40;0, 0&#41;; Solution Not sure what causes the problem but it seems to work find if you position the window 1 pixel lower. window.moveTo&#40;0, 1&#41;;]]></description>
			<content:encoded><![CDATA[
<!-- This is the start of the WP Twitter Button code -->
<div id="rk_wp_twitter_button" style="margin: 0px 0px 0px 0px; float: left"><a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Ftwitter.com%2Fshare&sref=rss" class="twitter-share-button" data-url="http://www.benhuson.co.uk/2010/01/15/javascript-moveto0-0-in-firefox-os-x-not-working/" data-count="horizontal" data-via="benhuson">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
<!-- This is the end of the WP Twitter Button code -->

 
<span class = "facebook-like" style = "height: 25px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.benhuson.co.uk/2010/01/15/javascript-moveto0-0-in-firefox-os-x-not-working/&layout=button_count&send=false&show_faces=false&width=&action=like&colorscheme=light&font=lucida grande" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:25px"></iframe></span><p><strong>Here&#8217;s a weird JavaScript FireFox bug&#8230;</strong></p>
<p>In OS X, for some reason the following javascript was not positioning the FireFox browser window to the top left of the screen.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">moveTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Solution</h3>
<p>Not sure what causes the problem but it seems to work find if you position the window 1 pixel lower.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">moveTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2010/01/15/javascript-moveto0-0-in-firefox-os-x-not-working/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

