<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx</link><description>ASP.NET ScriptManager control has a property LoadScriptsBeforeUI , when set to false , should load all AJAX framework scripts after the content of the page. But it does not effectively push down all scripts after the content. Some framework scripts, extender</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1676294</link><pubDate>Sat, 07 Mar 2009 12:25:52 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1676294</guid><dc:creator>Frano Hartman</dc:creator><description>&lt;p&gt;Hello, I really like this approach, you can look at my site www.adriaticglobal.net how it works. &lt;/p&gt;
&lt;p&gt;Also I have adapted it to work with ASP NET MVC control, look at this code...&lt;/p&gt;
&lt;p&gt;protected override void OnActionExecuting(ActionExecutingContext filterContext)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.Filter = new AdriaticGlobal.MVC.Utilty.ScriptDeferFilter(Response);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;base.OnActionExecuting(filterContext);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;just change in code HttpResponse to HttpResponseBase. &lt;/p&gt;
&lt;p&gt;You can see live example at:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.dubrovnik-accommodation.biz"&gt;www.dubrovnik-accommodation.biz&lt;/a&gt; (beta site).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1676294" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1672927</link><pubDate>Thu, 19 Feb 2009 16:01:26 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1672927</guid><dc:creator>Faiyaz</dc:creator><description>&lt;p&gt;Asak,&lt;/p&gt;
&lt;p&gt;I have incorporated ur sample but the last part which is combining script files into one url I didnt understand. You have mentioned some configuration file changes required for combining scripts into one URL.&lt;/p&gt;
&lt;p&gt;can you please give me the working sample so I can incorporate the same.&lt;/p&gt;
&lt;p&gt;faiyazmumtaz@yahoo.com&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1672927" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1670697</link><pubDate>Mon, 09 Feb 2009 17:18:24 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1670697</guid><dc:creator>darshan shah</dc:creator><description>&lt;p&gt;i could&amp;#39;nt understand the example at all.&lt;/p&gt;
&lt;p&gt;can you please give me the working example of aspx page so i can understand and incorporate in my site.&lt;/p&gt;
&lt;p&gt;my id is darshan43shah@gmail.com&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1670697" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1668450</link><pubDate>Tue, 03 Feb 2009 06:03:20 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1668450</guid><dc:creator>Pandiya</dc:creator><description>&lt;p&gt;Hey it doesn&amp;#39;t work for me.... I ve added ScriptDeferFilter to my app code folder... And in global ascx file it doesnt seems to work&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1668450" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1648991</link><pubDate>Fri, 26 Sep 2008 18:05:30 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1648991</guid><dc:creator>roncansan</dc:creator><description>&lt;p&gt;Where can I find the article, i did to see it?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1648991" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1648989</link><pubDate>Fri, 26 Sep 2008 17:34:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1648989</guid><dc:creator>omar</dc:creator><description>&lt;p&gt;Please use the &amp;quot;pin&amp;quot; on the google analytics script tag to let ScriptDeferFilter ignore the script tags. See my article how to use the &amp;quot;pin&amp;quot; feature.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1648989" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1648984</link><pubDate>Fri, 26 Sep 2008 17:13:19 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1648984</guid><dc:creator>roncansan</dc:creator><description>&lt;p&gt;Hi Omar &amp;quot;again&amp;quot;&lt;/p&gt;
&lt;p&gt;If I put the Google Analytics JS before the &amp;quot;head tag&amp;quot; ends it works grate, but if I put it after the &amp;quot;body tag&amp;quot; ends the ScriptDeferFilter eliminates it.&lt;/p&gt;
&lt;p&gt;In summary,&lt;/p&gt;
&lt;p&gt;if you use ScriptDeferFilter you must place at least one script before the &amp;quot;head tag&amp;quot; ends. If you manually place them after the &amp;quot;body tag&amp;quot; ends the ScriptDeferFilter eliminates it. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1648984" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1648982</link><pubDate>Fri, 26 Sep 2008 16:59:12 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1648982</guid><dc:creator>roncansan</dc:creator><description>&lt;p&gt;Hi Omar,&lt;/p&gt;
&lt;p&gt;Thanks for the article. I&amp;#39;m using it in one of my projects, but I have found something strange&lt;/p&gt;
&lt;p&gt;&amp;quot;I have a couple of pages that only have the google analytics JS, at the end of the page, when I applied the ScriptDeferFilter the google analytics JS disappear&amp;quot;&lt;/p&gt;
&lt;p&gt;Any insights?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1648982" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1644989</link><pubDate>Mon, 18 Aug 2008 23:32:19 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1644989</guid><dc:creator>Mohammed El Baz</dc:creator><description>&lt;p&gt;Thanks very much buddy, I was looking for this many days ago&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1644989" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1634465</link><pubDate>Thu, 12 Jun 2008 17:38:37 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1634465</guid><dc:creator>Yousaf</dc:creator><description>&lt;p&gt;There is a problem with scriptdeferfilter.cs my ajax rating is not working with it.&lt;/p&gt;
&lt;p&gt;can u post the fix.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1634465" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1633032</link><pubDate>Sun, 08 Jun 2008 23:15:13 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1633032</guid><dc:creator>Sayeed Ahmed</dc:creator><description>&lt;p&gt;Omar, &lt;/p&gt;
&lt;p&gt;It is really very good article. &amp;nbsp;Just need to know how can I implement “ScriptDeferFilter.cs” on VS 2005 project . &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1633032" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1626589</link><pubDate>Fri, 23 May 2008 21:18:20 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1626589</guid><dc:creator>Muhammad Yousaf Sulahria</dc:creator><description>&lt;p&gt;Adsense for ScriptDeferFilter v2:&lt;/p&gt;
&lt;p&gt;// See if script tag is ending&lt;/p&gt;
&lt;p&gt;if (isScriptTag(content, pos))&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;/// Script tag just ended. Get the whole script&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;/// and store in buffer&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;pos = pos + &amp;quot;script&amp;gt;&amp;quot;.Length;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;string temp=new string(content, scriptTagStart, pos - scriptTagStart);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if ((temp.IndexOf(&amp;quot;google_ad_client&amp;quot;)==-1) &amp;amp;&amp;amp; (temp.IndexOf(&amp;quot;googlesyndication&amp;quot;) == -1))&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;scriptBlocks.Append(content, scriptTagStart, pos - scriptTagStart);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;scriptBlocks.Append(Environment.NewLine);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.WriteOutput(content, scriptTagStart, pos - scriptTagStart);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;lastScriptTagEnd = pos;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;scriptTagStarted = false;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;pos--; // continue will increase pos by one again&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;continue;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1626589" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1610635</link><pubDate>Thu, 01 May 2008 08:13:19 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1610635</guid><dc:creator>sanjay kr gupta</dc:creator><description>&lt;p&gt;I was trying to implement this conecept on my application thank u&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1610635" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1589139</link><pubDate>Tue, 15 Apr 2008 19:30:13 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1589139</guid><dc:creator>satish</dc:creator><description>&lt;p&gt;Omar,&lt;/p&gt;
&lt;p&gt;I was trying to implement this conecept on my application i have a auto complete text search box and the user types in by the time the page renders how to handle this scenarious and sometimes the output also behaves weirdly. Please update&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1589139" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1579129</link><pubDate>Wed, 09 Apr 2008 08:50:32 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1579129</guid><dc:creator>Adeel</dc:creator><description>&lt;p&gt;if you use HttpWatch Professional, it shows all active connections used by the browser client. It wont show you exactly when the form tag will begin rendering, but you will be able to see the page download first and begin loading page elements such as images or javascripts. In the realtime transcript, it becomes quite clear that loading all js at the end makes for very fast page loading.&lt;/p&gt;
&lt;p&gt;At coroflot.com, we had to do something about multiple css files called at the start of the page. The same techniques / filter can be used to consolidate all css into one single file, compress and then serve. We do it via an offline process, but it can be done automatically with this technique.&lt;/p&gt;
&lt;p&gt;Lots of high profile system (such as communityserver.com) can get a nice boost with this.&lt;/p&gt;
&lt;p&gt;Thanks for sharing all your web dev. IQ&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1579129" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1578824</link><pubDate>Wed, 09 Apr 2008 04:03:52 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1578824</guid><dc:creator>omar</dc:creator><description>&lt;p&gt;On my laptop, it takes about an avg 40ms more to filter out 20KB of html output. It's negiligble compared to the client side benefit we get. There can be 20% reduction on total RPS on the server, but we can always throw in more server power or optimize server side code to compensate for that small loss in RPS. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1578824" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1578565</link><pubDate>Tue, 08 Apr 2008 21:10:45 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1578565</guid><dc:creator>Anil</dc:creator><description>&lt;p&gt;Ican see the difference on your site. thanks for sharing&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1578565" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1578305</link><pubDate>Tue, 08 Apr 2008 17:05:06 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1578305</guid><dc:creator>Sameeh</dc:creator><description>&lt;p&gt;Good Idea Omar, but I think that you are serving the client at the expense of the server.&lt;/p&gt;
&lt;p&gt;You added so much processing for filtering each page request that may lead to performance issue on server during heavy load.&lt;/p&gt;
&lt;p&gt;Did you captured the time consumed by your new filter approach and compared it with the 1.5 sec?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1578305" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1577373</link><pubDate>Mon, 07 Apr 2008 19:36:45 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1577373</guid><dc:creator>omar</dc:creator><description>&lt;p&gt;I haven't found any tool that can hook on browser and see when it starts rendering. So, I rely on my eye for now. As my goal is to improve perceived speed, not the actual speed, I have to look at the site and see how fast it 'feels'. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1577373" width="1" height="1"&gt;</description></item><item><title>re: Fast page loading by moving ASP.NET AJAX scripts after visible content</title><link>http://msmvps.com/blogs/omar/archive/2008/04/06/fast-page-loading-by-postponing-asp-net-ajax-scripts-after-content.aspx#1577361</link><pubDate>Mon, 07 Apr 2008 19:27:09 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1577361</guid><dc:creator>borko</dc:creator><description>&lt;p&gt;How can you measure the difference between this two solutions? Is there any way to measure the time which is passed between the request for the page and the moment when the page starts to render? &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1577361" width="1" height="1"&gt;</description></item></channel></rss>