<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>.NET Slave</title>
    <description>by Mads Kristensen</description>
    <link>http://madskristensen.net/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 2.5.0.7</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://madskristensen.net/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Mads Kristensen</dc:creator>
    <dc:title>.NET Slave</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/netSlave" /><feedburner:info uri="netslave" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><link>http://blog.madskristensen.dk/</link><url>http://blog.madskristensen.dk/themes/standard/madskristensen.png</url><title>.NET slave</title></image><item>
      <title>Introducing Pretty Paste for VS2012</title>
      <description>&lt;p&gt;Download &lt;a href="http://visualstudiogallery.msdn.microsoft.com/6a23234d-45f6-4212-bac3-f6d9bb08fb1e"&gt;Pretty Paste&lt;/a&gt; now!&lt;/p&gt;  &lt;p&gt;One of the things that have annoyed me about Visual Studio for many years, is the inconsistency when pasting code copied from websites. Depending on the browser you get different results. Consider the code snippet below copied from one of &lt;a href="http://sedodream.com/2013/03/02/MSDeployHowToUpdateAppSettingsOnPublishBasedOnThePublishProfile.aspx"&gt;Sayed’s blog posts&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_66.png" width="359" height="107" /&gt; &lt;/p&gt;  &lt;p&gt;If I copy that from Internet Explorer and paste it into Visual Studio, this is what I get:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_67.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_thumb_39.png" width="522" height="425" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And copied from Chrome result in this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_68.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_thumb_40.png" width="476" height="284" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;As you can see, both browsers include the line numbers, but they interpret them differently. Both browsers fail to understand my intent for copying the text and it has been that way forever. Very annoying. In tooling, understanding the user’s intent is the holy grail.&lt;/p&gt;  &lt;p&gt;So, in a rare moment of clarity a few days ago, I decided to fix this issue by writing an extension for Visual Studio - &lt;a href="http://visualstudiogallery.msdn.microsoft.com/6a23234d-45f6-4212-bac3-f6d9bb08fb1e"&gt;Pretty Paste&lt;/a&gt;. The idea is to inject some logic just before the regular Paste command in VS executes. That logic will quickly analyze the text being pasted and correct any non-intended line numbers and extra blank lines.&lt;/p&gt;  &lt;p&gt;With &lt;a href="http://visualstudiogallery.msdn.microsoft.com/6a23234d-45f6-4212-bac3-f6d9bb08fb1e"&gt;Pretty Paste&lt;/a&gt;, the result of pasting the above code sample now shows this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_69.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_thumb_41.png" width="472" height="149" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It automatically formats the code I pasted using the settings from each individual language. Here, my settings are set to use spaces instead of tabs and that is respected. &lt;/p&gt;  &lt;p&gt;In the case where you actually wanted the raw copied text instead of the cleaned up version provided by &lt;a href="http://visualstudiogallery.msdn.microsoft.com/6a23234d-45f6-4212-bac3-f6d9bb08fb1e"&gt;Pretty Paste&lt;/a&gt;, you can just undo the paste &lt;strong&gt;once&lt;/strong&gt; to get the raw paste. Here’s the result of a Pretty Paste followed by an undo:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_70.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_thumb_42.png" width="470" height="286" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This way we can have the best of both worlds. You decide. Nothing is lost.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/6a23234d-45f6-4212-bac3-f6d9bb08fb1e"&gt;Pretty Paste&lt;/a&gt; is my 6th Visual Studio extension and I love that extensibility let’s me fix use cases that are important to me. The code is simple, short and sweet. &lt;a href="https://github.com/madskristensen/PasteR "&gt;Check it out on GitHub&lt;/a&gt; and fork away. Pull requests are more then welcome.&lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/p0boZH7-kF0/post.aspx</link>
      <comments>http://madskristensen.net/post/Introducing-Pretty-Paste-for-VS2012.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=80c37fb9-1911-490b-b654-5fdd791ffce7</guid>
      <pubDate>Sun, 24 Mar 2013 12:22:29 -0700</pubDate>
      <dc:publisher>mads kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=80c37fb9-1911-490b-b654-5fdd791ffce7</pingback:target>
      <slash:comments>16</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=80c37fb9-1911-490b-b654-5fdd791ffce7</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Introducing-Pretty-Paste-for-VS2012.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=80c37fb9-1911-490b-b654-5fdd791ffce7</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=80c37fb9-1911-490b-b654-5fdd791ffce7</feedburner:origLink></item>
    <item>
      <title>AngularJS Intellisense in Visual Studio 2012</title>
      <description>&lt;p&gt;Recently, a lot of people have asked for Intellisense support for &lt;a href="http://angularjs.org/"&gt;AngularJS&lt;/a&gt; in the Visual Studio HTML editor. The bad news is that there is no extensibility for providing additional HTML attribute Intellisense, so I can&amp;rsquo;t ship this support in &lt;a href="http://vswebessentials.com/"&gt;Web Essentials&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The good news is that we can accomplish this through a more manual mechanism.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_65.png"&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" src="http://madskristensen.net/image.axd?picture=image_thumb_38.png" alt="image" width="278" height="231" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s what you need to do:&lt;/p&gt;
&lt;h2&gt;Step 1&lt;/h2&gt;
&lt;p&gt;Find the file &lt;strong&gt;commonHTML5Types.xsd&lt;/strong&gt; located in the Visual Studio install directory and back it up (just in case). Mine is here:&lt;em&gt; C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Step 2&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://madskristensen.net/file.axd?file=2013%2f2%2fcommonHTML5Types.xsd"&gt;Download this new version&lt;/a&gt; of commonHTML5Types.xsd and replace the existing&amp;nbsp;one&amp;nbsp;from the directory&amp;nbsp;in &lt;em&gt;Step 1&lt;/em&gt; with it.&lt;/p&gt;
&lt;h2&gt;Step 3&lt;/h2&gt;
&lt;p&gt;Restart Visual Studio and that's it. You now have all the ng-* attributes available in Intellisense.&amp;nbsp;This Works On My Machine&lt;sup&gt;tm&lt;/sup&gt;, so please let me know if it works on yours too.&lt;/p&gt;
&lt;p&gt;I still want to add native support in either Visual Studio or Web Essentials, so if this is something you&amp;rsquo;re interested in, please &lt;a href="http://webessentials.uservoice.com/forums/140520-general/suggestions/3487580-intellisense-for-angularjs"&gt;vote for it here&lt;/a&gt;.&lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/4Xky73XZDyo/post.aspx</link>
      <comments>http://madskristensen.net/post/AngularJS-Intellisense-in-Visual-Studio-2012.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=17594bb3-3121-4879-8a92-df00fe92b2dc</guid>
      <pubDate>Tue, 19 Feb 2013 14:04:00 -0700</pubDate>
      <category>Web Essentials</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=17594bb3-3121-4879-8a92-df00fe92b2dc</pingback:target>
      <slash:comments>37</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=17594bb3-3121-4879-8a92-df00fe92b2dc</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/AngularJS-Intellisense-in-Visual-Studio-2012.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=17594bb3-3121-4879-8a92-df00fe92b2dc</wfw:commentRss>
    <enclosure url="http://madskristensen.net/file.axd?file=2013%2f2%2fcommonHTML5Types.xsd" length="38229" type="application/octet-stream" /><feedburner:origLink>http://madskristensen.net/post.aspx?id=17594bb3-3121-4879-8a92-df00fe92b2dc</feedburner:origLink></item>
    <item>
      <title>Web Tools 2012.2 and Web Essentials</title>
      <description>&lt;p&gt;Today the ASP.NET and Web Tools 2012.2 update was released. &lt;a href="http://go.microsoft.com/fwlink/?LinkId=282650"&gt;Go download it right now&lt;/a&gt;!&lt;/p&gt;  &lt;p&gt;It contains a lot of new and updated Visual Studio tooling features including:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;First class LESS editor &lt;/li&gt;    &lt;li&gt;Knockout.js Intellisense &lt;/li&gt;    &lt;li&gt;Paste JSON as classes &lt;/li&gt;    &lt;li&gt;CoffeeScript editor &lt;/li&gt;    &lt;li&gt;Mustache/Handlebars/JsRender syntax highlighting &lt;/li&gt;    &lt;li&gt;Page Inspector      &lt;ul&gt;       &lt;li&gt;Live CSS auto-sync as you type &lt;/li&gt;        &lt;li&gt;JavaScript selection mapping and callstack &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Some of them are features that started their lives in &lt;a href="http://vswebessentials.com/"&gt;Web Essentials 2012&lt;/a&gt; and are now ported into an official release. Every time we move features from the experimental Web Essentials extension into the official product, we try to make the transition as smooth as possible. &lt;/p&gt;  &lt;p&gt;However, this time we moved some substantial features that are mutually exclusive – they register the same MEF components and that leads to this rather ugly exception:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=clip_image002.gif"&gt;&lt;img title="An exception has been encountered. This may be caused by an extension" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="An exception has been encountered. This may be caused by an extension" src="http://madskristensen.net/image.axd?picture=clip_image002_thumb.gif" width="496" height="231" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This exception occurs when Web Tools 2012.2 is installed and you haven’t updated Web Essentials to version 2.5. The solution is simply to update Web Essentials. &lt;a href="http://vswebessentials.com/download"&gt;Go do that now&lt;/a&gt;. If you don’t have Web Essentials installed at all, you won’t get this error because then there is no conflict. &lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/QPYXrMvnzEo/post.aspx</link>
      <comments>http://madskristensen.net/post/Web-Tools-20122-and-Web-Essentials.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=7b38cc04-8e63-4189-be53-05ad7fd28d2b</guid>
      <pubDate>Sun, 17 Feb 2013 16:08:33 -0700</pubDate>
      <category>Web Essentials</category>
      <category>ASP.NET</category>
      <dc:publisher>mads kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=7b38cc04-8e63-4189-be53-05ad7fd28d2b</pingback:target>
      <slash:comments>30</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=7b38cc04-8e63-4189-be53-05ad7fd28d2b</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Web-Tools-20122-and-Web-Essentials.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=7b38cc04-8e63-4189-be53-05ad7fd28d2b</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=7b38cc04-8e63-4189-be53-05ad7fd28d2b</feedburner:origLink></item>
    <item>
      <title>Google Analytics vs. Google Page Speed</title>
      <description>&lt;p&gt;&lt;strong&gt;Nerd alert&lt;/strong&gt;: This post is only for crazy website performance freaks. Proceed at your own risk.&lt;/p&gt;  &lt;p&gt;The holy grail for us crazy website performance freaks is to reach a perfect score of 100/100 in &lt;a href="https://developers.google.com/speed/pagespeed/"&gt;Google Page Speed&lt;/a&gt; without sacrificing important features of the website we’re building. One of those important features is &lt;a href="http://google.com/analytics"&gt;Google Analytics&lt;/a&gt;. Gotta have Google Analytics, right?!&lt;/p&gt;  &lt;p&gt;Let’s say that you’ve optimized your website to the perfect score of 100/100 and now decide to add Google Analytics. Too bad, your score is now 98/100. That’s because the &lt;em&gt;ga.js&lt;/em&gt; JavaScript file loaded from Google’s servers doesn’t have a far-future &lt;em&gt;expires&lt;/em&gt; HTTP header. To get the perfect score back, we need to fix this problem.&lt;/p&gt;  &lt;h2&gt;Getting back to 100/100&lt;/h2&gt;  &lt;p&gt;Here’s a solution that I use on &lt;a href="http://vswebessentials.com/"&gt;one of my websites&lt;/a&gt;. It involves the addition of a single .ashx file to your web project. It’s isolated, safe to use and works. &lt;/p&gt;  &lt;p&gt;The role of the .ashx file is to act as a proxy to the Google Analytics &lt;em&gt;ga.js&lt;/em&gt; script file by downloading its content and serving it with a sufficient &lt;em&gt;expires&lt;/em&gt; header. It caches the script file on the server, so it doesn’t have to download the &lt;em&gt;ga.js&lt;/em&gt; file every time a visitor hits your website.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Add an empty .ashx file (Generic Handler) to the root of you project and call it &lt;em&gt;ga.ashx&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Copy &lt;a href="https://github.com/ligershark/webdevchecklist.com/blob/6e64d062680542e6c7916256def183cecec17714/GoogleAnalytics.ashx"&gt;this code&lt;/a&gt; into the .ashx file you created in step 1.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;: Modify the Google Analytics tracking script on your page to look like this:&lt;/p&gt;  &lt;p&gt;&amp;lt;script&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; var _gaq = _gaq || [];     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; _gaq.push(['_setAccount', 'UA-12345678-9']);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; _gaq.push(['_trackPageview']);     &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;script src=&amp;quot;/ga.ashx&amp;quot; async=&amp;quot;async&amp;quot; defer=&amp;quot;defer&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;  &lt;p&gt;Voila! That’s it. You now have the perfect score back.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Optional step 4&lt;/strong&gt;: Don’t like the .ashx extension? Then change it to .js by adding this to the web.config:&lt;/p&gt;  &lt;p&gt;&amp;lt;rewrite&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;rules&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;rule name=&amp;quot;analytics&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;match url=&amp;quot;^ga.js&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;action type=&amp;quot;Rewrite&amp;quot; url=&amp;quot;ga.ashx&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/rule&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;/rules&amp;gt;     &lt;br /&gt;&amp;lt;/rewrite&amp;gt;&lt;/p&gt;  &lt;p&gt;You need to add it to the &amp;lt;system.webServer&amp;gt; section of web.config. Remember to run the AppPool in Integrated Pipeline Mode for the &amp;lt;system.webServer&amp;gt; section to kick in.&lt;/p&gt;  &lt;p&gt;Then just change the script tag to this:&lt;/p&gt;  &lt;p&gt;&amp;lt;script src=&amp;quot;&lt;strong&gt;/ga.js&lt;/strong&gt;&amp;quot; async=&amp;quot;async&amp;quot; defer=&amp;quot;defer&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;  &lt;h2&gt;Wait, is this a good idea?&lt;/h2&gt;  &lt;p&gt;I’ll let you be the judge of that. What I can tell you is that this exact code is running on one of my websites and it reports data to Google Analytics just fine. &lt;/p&gt;  &lt;p&gt;Does it work? &lt;strong&gt;Yes&lt;/strong&gt;     &lt;br /&gt;Is it cool? &lt;strong&gt;Totally&lt;/strong&gt;     &lt;br /&gt;Should I do it? &lt;strong&gt;N/A&lt;/strong&gt;&lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/bTWcqxo0rWQ/post.aspx</link>
      <comments>http://madskristensen.net/post/Google-Analytics-vs-Google-Page-Speed.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=b99eef0a-7f4d-42b2-bd24-13866ecc2ac4</guid>
      <pubDate>Wed, 16 Jan 2013 18:44:10 -0700</pubDate>
      <category>ASP.NET</category>
      <dc:publisher>mads kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=b99eef0a-7f4d-42b2-bd24-13866ecc2ac4</pingback:target>
      <slash:comments>39</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=b99eef0a-7f4d-42b2-bd24-13866ecc2ac4</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Google-Analytics-vs-Google-Page-Speed.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=b99eef0a-7f4d-42b2-bd24-13866ecc2ac4</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=b99eef0a-7f4d-42b2-bd24-13866ecc2ac4</feedburner:origLink></item>
    <item>
      <title>The ASP.NET developer checklist</title>
      <description>&lt;p&gt;&lt;a title="ASP.NET Web Developer Checklist" href="http://webdevchecklist.com/asp.net/"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://madskristensen.net/image.axd?picture=image_64.png" width="215" height="244" /&gt;&lt;/a&gt;In the beginning of January, we released the &lt;a href="http://webdevchecklist.com/"&gt;Web Developer Checklist&lt;/a&gt; with great interest from the general web community. The checklist helps raising awareness of common best practices for building websites.&lt;/p&gt;  &lt;p&gt;It was always the plan to branch the checklist out into technology specific checklists to make it even easier to apply all the best practices.&lt;/p&gt;  &lt;p&gt;Today we’re excited to announce the first technology specific checklist – the &lt;a href="http://webdevchecklist.com/asp.net/"&gt;ASP.NET Developer Checklist&lt;/a&gt;. It contains links to many ASP.NET specific tools and solutions to common problems. &lt;/p&gt;  &lt;p&gt;Not only is it a great tool for all ASP.NET developers to learn from, but also to track the progress of implementing the various best practices. &lt;/p&gt;  &lt;p&gt;We hope it will be received well and add value to the millions of ASP.NET developers worldwide. In the meantime we will be working on finishing &lt;a href="http://webdevchecklist.com/asp.net/performance/"&gt;another ASP.NET specific checklist&lt;/a&gt; that focuses on website performance. &lt;/p&gt;  &lt;p&gt;ASP.NET is just the first of many web technologies to receive its own checklist, so remember to check the &lt;a href="http://webdevchecklist.com/"&gt;Web Developer Checklist&lt;/a&gt; often for updates.&lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/foB7YXRlzs4/post.aspx</link>
      <comments>http://madskristensen.net/post/The-ASPNET-developer-checklist.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=50c1f571-d34a-408d-9ce7-dbe6142c5b91</guid>
      <pubDate>Tue, 15 Jan 2013 20:04:05 -0700</pubDate>
      <category>ASP.NET</category>
      <dc:publisher>mads kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=50c1f571-d34a-408d-9ce7-dbe6142c5b91</pingback:target>
      <slash:comments>59</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=50c1f571-d34a-408d-9ce7-dbe6142c5b91</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/The-ASPNET-developer-checklist.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=50c1f571-d34a-408d-9ce7-dbe6142c5b91</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=50c1f571-d34a-408d-9ce7-dbe6142c5b91</feedburner:origLink></item>
    <item>
      <title>Fix for uncompressed JS files on IIS</title>
      <description>&lt;p&gt;Rule #1 in website optimization is to enable GZip compression on the web server. This is very easy using web.config as &lt;a href="http://www.iis.net/configreference/system.webserver/urlcompression"&gt;explained here&lt;/a&gt;. However, some web servers have disabled automatic compression of JavaScript files, because they are served with the content type: &lt;strong&gt;application/x-javascript&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;For these web servers we can use a web.config trick to change the content type of JavaScript files to &lt;strong&gt;text/javascript&lt;/strong&gt;. This is a completely valid content type supported by all browsers.&lt;/p&gt;  &lt;p&gt;Just paste the following XML snippet in to your web.config’s &amp;lt;system.webServer&amp;gt; section.&lt;/p&gt;  &lt;p&gt;&amp;lt;staticContent&amp;gt;   &lt;br /&gt;&amp;#160; &amp;lt;remove fileExtension=&amp;quot;.js&amp;quot;/&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;mimeMap fileExtension=&amp;quot;.js&amp;quot; mimeType=&amp;quot;text/javascript&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;lt;/staticContent&amp;gt;&lt;/p&gt;  &lt;p&gt;Chances are that you don’t have this issue, since it seems to only apply to some hosters, but now you know how to get around it should you ever end up in the situation with uncompressed JavaScript files.&lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/gOCrlHhTVQM/post.aspx</link>
      <comments>http://madskristensen.net/post/Fix-for-uncompressed-JS-files.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=e9a15cdc-9e08-47d0-b7b6-bff1e611f4df</guid>
      <pubDate>Sun, 13 Jan 2013 19:18:09 -0700</pubDate>
      <category>ASP.NET</category>
      <dc:publisher>mads kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=e9a15cdc-9e08-47d0-b7b6-bff1e611f4df</pingback:target>
      <slash:comments>11</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=e9a15cdc-9e08-47d0-b7b6-bff1e611f4df</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Fix-for-uncompressed-JS-files.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=e9a15cdc-9e08-47d0-b7b6-bff1e611f4df</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=e9a15cdc-9e08-47d0-b7b6-bff1e611f4df</feedburner:origLink></item>
    <item>
      <title>Cache busting in ASP.NET</title>
      <description>&lt;p&gt;Optimizing for website performance includes setting long expiration dates on our static resources, such s images, stylesheets and JavaScript files. Doing that tells the browser to cache our files so it doesn’t have to request them every time the user loads a page. This is one of the most important things to do when optimizing websites.&lt;/p&gt;  &lt;p&gt;In ASP.NET on IIS7+ it’s really easy. Just add this chunk of XML to the web.config’s &amp;lt;system.webServer&amp;gt; element:&lt;/p&gt;  &lt;p&gt;&amp;lt;staticContent&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;clientCache cacheControlMode=&amp;quot;UseMaxAge&amp;quot; cacheControlMaxAge=&amp;quot;365:00:00&amp;quot; /&amp;gt;     &lt;br /&gt;&amp;lt;/staticContent&amp;gt;&lt;/p&gt; &lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;p&gt;The above code tells the browsers to automatically cache all static resources for 365 days. That’s good and you should do this right now.&lt;/p&gt;  &lt;p&gt;The issue becomes clear the first time you make a change to any static file. How is the browser going to know that you made a change, so it can download the latest version of the file? The answer is that it can’t. It will keep serving the same cached version of the file for the next 365 days regardless of any changes you are making to the files.&lt;/p&gt;  &lt;h2&gt;Fingerprinting&lt;/h2&gt;  &lt;p&gt;The good news is that it is fairly trivial to make a change to our code, that changes the URL pointing to the static files and thereby tricking the browser into believing it’s a brand new resource that needs to be downloaded.&lt;/p&gt;  &lt;p&gt;Here’s a little class that I use on several websites, that adds a fingerprint, or timestamp, to the URL of the static file.&lt;/p&gt;  &lt;p&gt;using System;    &lt;br /&gt;using System.IO;     &lt;br /&gt;using System.Web;     &lt;br /&gt;using System.Web.Caching;     &lt;br /&gt;using System.Web.Hosting;&lt;/p&gt;  &lt;p&gt;public class Fingerprint    &lt;br /&gt;{     &lt;br /&gt;&amp;#160; public static string Tag(string rootRelativePath)     &lt;br /&gt;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (HttpRuntime.Cache[rootRelativePath] == null)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string absolute = HostingEnvironment.MapPath(&amp;quot;~&amp;quot; + rootRelativePath);&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DateTime date = File.GetLastWriteTime(absolute);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int index = rootRelativePath.LastIndexOf('/');&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string result = rootRelativePath.Insert(index, &amp;quot;/v-&amp;quot; + date.Ticks);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; HttpRuntime.Cache.Insert(rootRelativePath, result, new CacheDependency(absolute));     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return HttpRuntime.Cache[rootRelativePath] as string;    &lt;br /&gt;&amp;#160; }     &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;All you need to change in order to use this class, is to modify the references to the static files.&lt;/p&gt;  &lt;h2&gt;Modify references&lt;/h2&gt;  &lt;p&gt;Here’s what it looks like in Razor for the stylesheet reference:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;@Fingerprint.Tag(&amp;quot;&lt;/span&gt;/&lt;span class="attr"&gt;content&lt;/span&gt;/&lt;span class="attr"&gt;site&lt;/span&gt;.&lt;span class="attr"&gt;css&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;quot;)&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;…and in WebForms:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;&amp;lt;%=Fingerprint.Tag(&amp;quot;&lt;/span&gt;/&lt;span class="attr"&gt;content&lt;/span&gt;/&lt;span class="attr"&gt;site&lt;/span&gt;.&lt;span class="attr"&gt;css&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;quot;) %&amp;gt;&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;The result of using the FingerPrint.Tag method will in this case be:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;/content/v-634933238684083941/site.css&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Since the URL now has a reference to a non-existing folder (v-634933238684083941), we need to make the web server pretend it exist. We do that with URL rewriting.&lt;/p&gt;

&lt;h2&gt;URL rewrite&lt;/h2&gt;

&lt;p&gt;By adding this snippet of XML to the web.config’s &amp;lt;system.webServer&amp;gt; section, we instruct IIS 7+ to intercept all URLs with a folder name containing “v=[numbers]” and rewrite the URL to the original file path.&lt;/p&gt;

&lt;p&gt;&amp;lt;rewrite&amp;gt;
  &lt;br /&gt;&amp;#160; &amp;lt;rules&amp;gt;

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;rule name=&amp;quot;fingerprint&amp;quot;&amp;gt;

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;match url=&amp;quot;([\S]+)(/v-[0-9]+/)([\S]+)&amp;quot;&amp;#160; /&amp;gt;

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;action type=&amp;quot;Rewrite&amp;quot; url=&amp;quot;{R:1}/{R:3}&amp;quot; /&amp;gt;

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/rule&amp;gt;

  &lt;br /&gt;&amp;#160; &amp;lt;/rules&amp;gt;

  &lt;br /&gt;&amp;lt;/rewrite&amp;gt;&lt;/p&gt;

&lt;p&gt;You can use this technique for all your JavaScript and image files as well.&lt;/p&gt;

&lt;p&gt;The beauty is, that every time you change one of the referenced static files, the fingerprint will change as well. This creates a brand new URL every time so the browsers will download the updated files.&lt;/p&gt;

&lt;p&gt;FYI, you need to run the AppPool in &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc135973.aspx"&gt;Integrated Pipeline mode&lt;/a&gt; for the &amp;lt;system.webServer&amp;gt; section to have any effect.&lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/iv99ndOLHAo/post.aspx</link>
      <comments>http://madskristensen.net/post/Cache-busting-in-ASPNET.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=c8a7f71e-b5b4-44e1-802c-daa7802af3b6</guid>
      <pubDate>Wed, 09 Jan 2013 13:03:05 -0700</pubDate>
      <category>ASP.NET</category>
      <category>Tips and tricks</category>
      <dc:publisher>mads kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=c8a7f71e-b5b4-44e1-802c-daa7802af3b6</pingback:target>
      <slash:comments>42</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=c8a7f71e-b5b4-44e1-802c-daa7802af3b6</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Cache-busting-in-ASPNET.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=c8a7f71e-b5b4-44e1-802c-daa7802af3b6</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=c8a7f71e-b5b4-44e1-802c-daa7802af3b6</feedburner:origLink></item>
    <item>
      <title>Web Developer Checklist</title>
      <description>&lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_59.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://madskristensen.net/image.axd?picture=image_thumb_35.png" width="305" height="269" /&gt;&lt;/a&gt;So you just built a website and are about to make it public to the world. You go through a few checks to make sure that everything works as expected. Perhaps run HTML validation and other similar services. &lt;/p&gt;  &lt;p&gt;But are you sure you remembered to implement all the best practices? Does it look good on mobile devices, in Windows 8 snapped view and what about basic accessibility?&lt;/p&gt;  &lt;p&gt;Enter &lt;a href="http://webdevchecklist.com/"&gt;Web Developer Checklist&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We’ve tried to come up with the complete list of tasks and checks that every web developer should go through when developing any kind of website. The &lt;a href="http://webdevchecklist.com/"&gt;Web Developer Checklist&lt;/a&gt; is structured in a way that makes it really easy to follow the progress as well as getting help to perform all the checks.&lt;/p&gt;  &lt;p&gt;Give it a try and let me know what you think.&lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/gZWbueWili8/post.aspx</link>
      <comments>http://madskristensen.net/post/Web-Developer-Checklist.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=e4073031-072c-485c-a5ed-ed67a61735eb</guid>
      <pubDate>Mon, 07 Jan 2013 19:06:31 -0700</pubDate>
      <category>ASP.NET</category>
      <category>Tips and tricks</category>
      <dc:publisher>mads kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=e4073031-072c-485c-a5ed-ed67a61735eb</pingback:target>
      <slash:comments>20</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=e4073031-072c-485c-a5ed-ed67a61735eb</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Web-Developer-Checklist.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=e4073031-072c-485c-a5ed-ed67a61735eb</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=e4073031-072c-485c-a5ed-ed67a61735eb</feedburner:origLink></item>
    <item>
      <title>Web Essentials nightly builds</title>
      <description>&lt;p&gt;Many Web Essentials users have requested a more formal process around nightly builds, that should result in a better delivery and update mechanism. To make it really easy to always run the latest and greatest, I&amp;rsquo;ve now created a custom feed for the &lt;em&gt;Extensions and Updates&lt;/em&gt; dialog in Visual Studio 2012.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how it works:&lt;/p&gt;
&lt;p&gt;Go to &lt;em&gt;Tools &amp;gt; Options&lt;/em&gt; and open the the tab located under &lt;em&gt;Environment &amp;ndash;&amp;gt; Extensions and Updates&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_56.png"&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" src="http://madskristensen.net/image.axd?picture=image_thumb_33.png" alt="image" width="644" height="379" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click the &lt;em&gt;Add&lt;/em&gt; button and type &amp;ldquo;Web Essentials Nightly&amp;rdquo; in the &lt;em&gt;Name&lt;/em&gt; field and &amp;ldquo;&lt;a href="http://vswebessentials.com/nightly/feed.ashx" target="_blank"&gt;http://vswebessentials.com/nightly/feed.ashx&lt;/a&gt;&amp;rdquo; in the &lt;em&gt;URL&lt;/em&gt; field. Now click the &lt;em&gt;Apply&lt;/em&gt; button and you&amp;rsquo;re all set. Now click the &lt;em&gt;OK&lt;/em&gt; button to exit the Options dialog.&lt;/p&gt;
&lt;p&gt;Now the custom feed shows up in the Extensions dialog. Go to &lt;em&gt;Tools &amp;gt; Extensions and Updates&amp;hellip;&lt;/em&gt; to verify that the new feed is working. You should have a new sub category under the &lt;em&gt;Online&lt;/em&gt; tab called &amp;ldquo;Web Essentials Nightly&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="image" src="http://madskristensen.net/image.axd?picture=image_57.png" alt="image" width="613" height="258" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;The Nightly build shares the same extension ID as the official released versions of Web Essentials, so the newest one will always override the one installed &amp;ndash; regardless if it&amp;rsquo;s the nightly build or the official version. And updates will work normally.&lt;/p&gt;
&lt;p&gt;In other words, it should be perfectly safe to use this custom feed without any changes to how the update mechanism works from the user&amp;rsquo;s point of view. Only difference is that with this new feed, you can get the updates much faster than before.&lt;/p&gt;
&lt;p&gt;Give it a try and let me know what you think.&lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/B4mnaSK-Ygc/post.aspx</link>
      <comments>http://madskristensen.net/post/Web-Essentials-nightly-builds.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=85f6849a-62d7-4f8b-bf50-659d3c266661</guid>
      <pubDate>Sun, 02 Dec 2012 11:44:00 -0700</pubDate>
      <category>Web Essentials</category>
      <dc:publisher>Mads Kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=85f6849a-62d7-4f8b-bf50-659d3c266661</pingback:target>
      <slash:comments>12</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=85f6849a-62d7-4f8b-bf50-659d3c266661</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Web-Essentials-nightly-builds.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=85f6849a-62d7-4f8b-bf50-659d3c266661</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=85f6849a-62d7-4f8b-bf50-659d3c266661</feedburner:origLink></item>
    <item>
      <title>Web Essentials 1.4 released</title>
      <description>&lt;p&gt;This release has some cool features, some tweaks to existing ones and some bug fixes. Let’s take a tour and then go &lt;a href="http://visualstudiogallery.msdn.microsoft.com/07d54d12-7133-4e15-becb-6f451ea3bea6" target="_blank"&gt;download&lt;/a&gt; it.&lt;/p&gt;  &lt;h2&gt;Automatic update to CSS schema files&lt;/h2&gt;  &lt;p&gt;The W3C continues to evolve the CSS specification and so do all the browser vendors. It’s therefore important to always keep up-to-date with the changes to take full advantage of the web platform. Web Essentials now automatically downloads new schema files whenever there is a change. &lt;/p&gt;  &lt;p&gt;This is really cool, because Visual Studio will now always have the latest W3C specifications AND the latest vendor specific properties in Intellisense and validation. Latest schema files include support for Firefox 16, Opera 12.1 and all the rest.&lt;/p&gt;  &lt;p&gt;This feature is very close to my heart. &lt;/p&gt;  &lt;h2&gt;Modernizr support&lt;/h2&gt;  &lt;p&gt;When writing any kind of modern web application, you can use &lt;a href="http://modernizr.com/" target="_blank"&gt;Modernizr&lt;/a&gt; to fill in the gabs between old and new browsers. Modernizr is a JavaScript library that, among other things, places a lot of class names in the &amp;lt;html&amp;gt; element of web pages. These class names are very useful to utilize from CSS to provide graceful degradation for older browsers and now they are fully supported in the CSS editor.&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_51.png" width="232" height="117" /&gt;&lt;/p&gt;  &lt;p&gt;As you might be able to tell, two things are happing in the above screenshot. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Modernizr specific class names are bolded&lt;/li&gt;    &lt;li&gt;Hierarchical indentation supports the class names and indent correctly&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I like this feature because it makes it very clear and transparent what is going on when using Modernizr.&lt;/p&gt;  &lt;h2&gt;Minification&lt;/h2&gt;  &lt;p&gt;Through a right-click menu in Solution Explorer, it is now possible to create .min files from both CSS and JavaScript files. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_52.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_thumb_29.png" width="514" height="283" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The .min file will be nested under it’s parent source file.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_53.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_thumb_30.png" width="164" height="43" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Every time a change is saved in the parent &lt;em&gt;styles.css&lt;/em&gt; file, the &lt;em&gt;styles.min.css&lt;/em&gt; file is automatically updated with the minified version of its parent.&amp;#160; The right-click gesture works on both individual CSS and JavaScript files, but also on folders, which will then create min files for all CSS or JavaScript files in that folder.&lt;/p&gt;  &lt;p&gt;It only handles minification, not multi-file bundling. That’s coming in the next update.&lt;/p&gt;  &lt;h2&gt;CSS/LESS document outline&lt;/h2&gt;  &lt;p&gt;Get a sneak-peek inside any CSS or LESS file directly from Solution Explorer.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_54.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_thumb_31.png" width="256" height="294" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For CSS it will display @-directives, IDs and class names used in the file. For LESS it will also show the Mixins and variables used. You can navigate this outline using only the keyboard and have each item open up automatically in the Preview Tab.&lt;/p&gt;  &lt;h2&gt;W3C only&lt;/h2&gt;  &lt;p&gt;Tired of Intellisense for non-W3C properties, @-directives, pseudo elements and property values? You can now chose to only see the W3C standards. Using any vendor specifics will result in a validation error. Is this strange? Perhaps. Let me know!&lt;/p&gt;  &lt;h2&gt;Shorthand validation&lt;/h2&gt;  &lt;p&gt;This is a work in progress, but I wanted to include the early bits in this version. The CSS validator will now throw an error if you use properties that should be rolled into a shorthand expression. For instance, if you use &lt;em&gt;margin-top&lt;/em&gt;, &lt;em&gt;margin-right&lt;/em&gt;, &lt;em&gt;margin-bottom&lt;/em&gt; and &lt;em&gt;margin-left&lt;/em&gt; in the same rule, it will tell you to combine the properties into &lt;em&gt;margin&lt;/em&gt;. Full parsing and validation is coming in a future version.&lt;/p&gt;  &lt;h2&gt;Nested LESS selector Intellisense&lt;/h2&gt;  &lt;p&gt;When writing nested selectors in LESS you will run into a very annoying problem with pseudo selectors. The Intellisense list will &lt;em&gt;force&lt;/em&gt; you to write a pseudo selector when you in fact just wanted a colon. This is now fixed.&lt;/p&gt;  &lt;h2&gt;Source Control&lt;/h2&gt;  &lt;p&gt;The LESS, CoffeeScript and &lt;a href="http://www.typescriptlang.org/" target="_blank"&gt;TypeScript&lt;/a&gt; compilers doesn’t know how to check files out of source control before they try to compile and override the output file. Web Essentials will now check out the right files to avoid write permission issues.&lt;/p&gt;  &lt;h2&gt;New options structure&lt;/h2&gt;  &lt;p&gt;The Tools –&amp;gt; Options dialog has been updated with even more options and with a more granular structure. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://madskristensen.net/image.axd?picture=image_55.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://madskristensen.net/image.axd?picture=image_thumb_32.png" width="644" height="375" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This makes it easier to search for specific items using Quick Launch (CTRL + Q) and also makes it less cluttered.&lt;/p&gt;  &lt;h2&gt;Minor improvements&lt;/h2&gt;  &lt;p&gt;Beyond the features mentioned, a lot of small tweaks and fixes also made it in to this release. Here are some of them:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Cleaned up right-click menu&lt;/li&gt;    &lt;li&gt;Added minification inside the CSS and JavaScript editors&lt;/li&gt;    &lt;li&gt;Disallow zero values in CSS (0px, 0%, 0em etc. should not have the unit)&lt;/li&gt;    &lt;li&gt;TypeScript now supports ES5 correctly&lt;/li&gt;    &lt;li&gt;TypeScript compiler switches now featured in the options dialog&lt;/li&gt;    &lt;li&gt;General bug fixes&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;As always, let me know if you run into issues or have some ideas for new features or tweaks.&lt;/p&gt;  &lt;p&gt;You should &lt;a href="http://visualstudiogallery.msdn.microsoft.com/07d54d12-7133-4e15-becb-6f451ea3bea6" target="_blank"&gt;download Web Essentials 1.4&lt;/a&gt; right now!&lt;/p&gt;&lt;a href="http://www.winhost.com/a/benet_l_6" style="color:#555;display:block;background:#f1f1f1;padding: 10px" target="_blank"&gt;* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!&lt;/a&gt;</description>
      <link>http://feedproxy.google.com/~r/netSlave/~3/6KhjFVlxD3g/post.aspx</link>
      <comments>http://madskristensen.net/post/Web-Essentials-14-released.aspx#comment</comments>
      <guid isPermaLink="false">http://madskristensen.net/post.aspx?id=b6df652c-db6f-4828-a05b-aa579abcf069</guid>
      <pubDate>Thu, 11 Oct 2012 18:55:01 -0700</pubDate>
      <category>Web Essentials</category>
      <dc:publisher>mads kristensen</dc:publisher>
      <pingback:server>http://madskristensen.net/pingback.axd</pingback:server>
      <pingback:target>http://madskristensen.net/post.aspx?id=b6df652c-db6f-4828-a05b-aa579abcf069</pingback:target>
      <slash:comments>30</slash:comments>
      <trackback:ping>http://madskristensen.net/trackback.axd?id=b6df652c-db6f-4828-a05b-aa579abcf069</trackback:ping>
      <wfw:comment>http://madskristensen.net/post/Web-Essentials-14-released.aspx#comment</wfw:comment>
      <wfw:commentRss>http://madskristensen.net/syndication.axd?post=b6df652c-db6f-4828-a05b-aa579abcf069</wfw:commentRss>
    <feedburner:origLink>http://madskristensen.net/post.aspx?id=b6df652c-db6f-4828-a05b-aa579abcf069</feedburner:origLink></item>
  </channel>
</rss>
