The best way to load external JavaScript

I found another post from Nicholas Zakas interesting:   The best way to load external JavaScript http://www.nczonline.net/blog/2009/07/28/the-best-way-to-load-external-javascript/   default.html <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Test page</title> </head> <body> <script type="text/javascript" src="http://your.cdn.com/first.js"></script> <script type="text/javascript"> loadScript("http://your.cdn.com/second.js", function () { //initialization code }); </script> </body> </html> first.js function loadScript(url, callback) { …

The 4 JavaScript load opportunities

Interesting podcast by Scott Hanselman and Nicholas Zakas: http://hanselminutes.com/383/enough-with-the-javascript-already-with-nicholas-zakas   It mentions the 4 JavaScript load opportunities: In the <head> tag Before the </body> tag After page load (windows.onload DOM ready function) On demand (when user clicks a button, mouse is 100px from button, user types first letter etc.)   …

Fix: The type initializer for ‘Microsoft.DataTransformationServices.Project.SharedIcons’ threw an exception. (Microsoft Visual Studio 2012)

  After some automatic Windows updates, I was unable to open my SSIS projects in Microsoft Visual Studio 2012. The following error was shown: The type initializer for ‘Microsoft.DataTransformationServices.Project.SharedIcons’ threw an exception.   After a google search, I found the following solution at: http://social.technet.microsoft.com/Forums/en-US/829e1fca-fbbf-43d8-bde5-202ad95e8643/the-type-initializer-for-microsoftdatatransformationservicesdesignsharedicons-threw-an   Solution Download and install http://support.microsoft.com/kb/2861107 …

Using host headers with self hosted ASP.NET SignalR 2.0

If you want to use host headers in development with self hosted ASP .NET SignalR 2.0, you can add the hostheader to your hosts file, found in C:\Windows\System32\Drivers\etc   Then use the following adjusted client and server from the tutorial at http://www.asp.net/signalr/overview/getting-started/tutorial-signalr-self-host:   Server namespace SignalRSelfHost { using System; using …

ASP.NET SignalR self hosting: Fixing the error XMLHttpRequest cannot load http://localhost:8080/signalr/negotiate…. Origin http://localhost:52947 is not allowed by Access-Control-Allow-Origin.

  If you follow the tutorial http://www.asp.net/signalr/overview/getting-started/tutorial-signalr-self-host to the letter, you will end up with an error:   XMLHttpRequest cannot load http://localhost:8080/signalr/negotiate?connectionData=%5B%7B%22name%22%3A%22myhub%22%7D%5D&clientProtocol=1.3&_=1378817568655. Origin http://localhost:52947 is not allowed by Access-Control-Allow-Origin. Default.html:1   The solution can be found on http://stackoverflow.com/questions/18471853/cross-domain-requests-not-working-in-signalr-2-0-0-rc1   The server should look like:   namespace SignalRSelfHost { using System; …