<?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>block &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/block/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>Google Adsense blocks the page load</title>
		<link>/2009/06/10/google-adsense-blocks-the-page-load/</link>
		<comments>/2009/06/10/google-adsense-blocks-the-page-load/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 05:24:42 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">/?p=593</guid>
		<description><![CDATA[The Google Adsense code block Everyone dealing with Google Adsense knows how it looks like as JavaScript code. When you register, apply and receive the code chunk, you receive actually an inline chunk of js describing the width and height of the code and the key, uniquely identifying the page ad and an included javascript &#8230; <a href="/2009/06/10/google-adsense-blocks-the-page-load/" class="more-link">Continue reading <span class="screen-reader-text">Google Adsense blocks the page load</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/06/10/google-adsense-iframes-and-ie/" rel="bookmark" title="Google Adsense, iframes and IE">Google Adsense, iframes and IE </a></li>
<li><a href="/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/" rel="bookmark" title="javascript: detect browser speed and load the &#8220;slow connection&#8221; site version">javascript: detect browser speed and load the &#8220;slow connection&#8221; site version </a></li>
<li><a href="/2010/06/24/zend-framework-inject-javascript-code-in-a-actionview/" rel="bookmark" title="Zend Framework: Inject JavaScript Code in a Action/View">Zend Framework: Inject JavaScript Code in a Action/View </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>The Google Adsense code block</h2>
<p>Everyone dealing with Google Adsense knows how it looks like as JavaScript code. When you register, apply and receive the code chunk, you receive actually an inline chunk of js describing the width and height of the code and the key, uniquely identifying the page ad and an included javascript file.</p>
<blockquote>
<pre id="line1">&lt;<span class="start-tag">script</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/javascript"</span>&gt;&lt;!--
google_ad_client = "pub-9858850710257888";
/* 250x250, google ad 09-5-19 */
google_ad_slot = "0062396170";
google_ad_width = 250;
google_ad_height = 250;
//--&gt;
&lt;/<span class="end-tag">script</span>&gt;
&lt;<span class="start-tag">script</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/javascript"
</span><span class="attribute-name">src</span>=<span class="attribute-value">"http://pagead2.googlesyndication.co/..."</span>&gt;
&lt;/<span class="end-tag">script</span>&gt;</pre>
</blockquote>
<h2>Inline scripts and their behavior</h2>
<p>The problem with the page load is that inline scripts included somewhere in the page, the case with adsense is just like that, blocks every page load until the script is executed. Of course when you&#8217;ve two or three ads somewhere in your page that causes huge delay of page load. Sometimes that may delay the page twice as much as if there were no ads from Google.</p>
<h2>The workaround</h2>
<p>The simple workaround is to place your ads &lt;script&gt; inline, included or both in a separate .html file and to include it as &lt;iframe&gt;. Such a solution gives the page the ability of render before the iframe is executed and the page load event is fired in an early stage.</p>
<blockquote><p>&lt;iframe src=&#8221;/path_to_the_banner.html&#8221;&gt;&lt;/iframe&gt;</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/06/10/google-adsense-iframes-and-ie/" rel="bookmark" title="Google Adsense, iframes and IE">Google Adsense, iframes and IE </a></li>
<li><a href="/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/" rel="bookmark" title="javascript: detect browser speed and load the &#8220;slow connection&#8221; site version">javascript: detect browser speed and load the &#8220;slow connection&#8221; site version </a></li>
<li><a href="/2010/06/24/zend-framework-inject-javascript-code-in-a-actionview/" rel="bookmark" title="Zend Framework: Inject JavaScript Code in a Action/View">Zend Framework: Inject JavaScript Code in a Action/View </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/06/10/google-adsense-blocks-the-page-load/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
