Sunday, November 30, 2014

BrowserLink for static html,css, js(website project) Visual Studio

This will be useful for website projects that has just static html/css/jsfiles like AngularJs.

Create Website project
Add html,css,js
Add the following to web.config (below)
Run website using iis express
Browserlink should be enabled by now.
Make changes to these files and press Ctrl + Alt + Enter to update all connected browsers using browserlink.

web.config snippet.

  <system.webServer>
    <handlers>
      <add name="Browser Link for HTML" path="*.html" verb="*"
           type="System.Web.StaticFileHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           resourceType="File" preCondition="integratedMode" />
    </handlers>
  </system.webServer>
  
    <system.web>
      <compilation debug="true" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>

No comments:

Post a Comment