<?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>connection &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/connection/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>javascript: detect browser speed and load the &#8220;slow connection&#8221; site version</title>
		<link>/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/</link>
		<comments>/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 06:29:30 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[low fidelity]]></category>
		<category><![CDATA[slow]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">/?p=687</guid>
		<description><![CDATA[How to detect the browser speed? It&#8217;s easy, you just put a ajax or image load in the beginning of the page and than you know what the speed is. But the problem is that the ajax and the image load need to finish to know exactly how slow or fast the connections is. And &#8230; <a href="/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/" class="more-link">Continue reading <span class="screen-reader-text">javascript: detect browser speed and load the &#8220;slow connection&#8221; site version</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/" rel="bookmark" title="Speed up the JavaScript. It can change dramatically the user experience.">Speed up the JavaScript. It can change dramatically the user experience. </a></li>
<li><a href="/2010/02/11/javascript-optimization-lazy-loading/" rel="bookmark" title="JavaScript optimization. Lazy loading.">JavaScript optimization. Lazy loading. </a></li>
<li><a href="/2010/02/09/optimizing-openlayers-speed-up-markers-load-time/" rel="bookmark" title="Optimizing OpenLayers. Speed up markers load time!">Optimizing OpenLayers. Speed up markers load time! </a></li>
<li><a href="/2009/04/14/load-flash-swf-in-hidden-div/" rel="bookmark" title="load flash .swf in hidden div">load flash .swf in hidden div </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>How to detect the browser speed?</h2>
<p>It&#8217;s easy, you just put a ajax or image load in the beginning of the page and than you know what the speed is. But the problem is that the ajax and the image load need to finish to know exactly how slow or fast the connections is. And even worse, you need to slow down the page even for normal (fast) connections. And where&#8217;s the point? You get the site slower only to understand the connection. That&#8217;s not OK.</p>
<p><img class="alignnone size-full wp-image-697" title="slow-connection-detection" src="/wp-content/uploads/2009/07/slow-connection-detection.png" alt="" width="430" height="133" srcset="/wp-content/uploads/2009/07/slow-connection-detection.png 430w, /wp-content/uploads/2009/07/slow-connection-detection-300x92.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></p>
<h2>The javascript blocks the page load</h2>
<p>That&#8217;s another problem with javascript. You know when you have script tag in the head of the document, the browser needs to finish loading this javascript, parse it and than continue loading.</p>
<h2>How javascript can be loaded async</h2>
<p>Well there are several methods, but here we need only one separate javascript that don&#8217;t communicate with other JS code in the site, it only get information about the connection speed.</p>
<h2>Put the javascript code in an Iframe.</h2>
<p>Than the loading of that javascript is async. Independently you continue loading the site. For fast connection, yes this going to slow down a little bit, but however not as much as if you put an inline code. Than in that iframe you can simply check for an expression to verify for a slow connection if it&#8217;s true you may set a cookie for slow connection site version and reload the window.parent of the iframe, which is the page itself.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/" rel="bookmark" title="Speed up the JavaScript. It can change dramatically the user experience.">Speed up the JavaScript. It can change dramatically the user experience. </a></li>
<li><a href="/2010/02/11/javascript-optimization-lazy-loading/" rel="bookmark" title="JavaScript optimization. Lazy loading.">JavaScript optimization. Lazy loading. </a></li>
<li><a href="/2010/02/09/optimizing-openlayers-speed-up-markers-load-time/" rel="bookmark" title="Optimizing OpenLayers. Speed up markers load time!">Optimizing OpenLayers. Speed up markers load time! </a></li>
<li><a href="/2009/04/14/load-flash-swf-in-hidden-div/" rel="bookmark" title="load flash .swf in hidden div">load flash .swf in hidden div </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
