a developer's notes – a semi-technical web development BLOG

February 12, 2014

Check if Browser is IE and Which Version of IE with HTML

Filed under: CSS / Styling,HTML — Duy Nguyen @ 8:16 pm
Tags: , , , , ,

Check if the browser is using IE8

<!--[if IE 8]> 
	<script src="_ie8.js"></script>
<![endif]-->

This stylesheet will only display to IE9 or above, along with every other non-IE browser. Notice opening and closing expressions are wrapped in comments.

<!--[if gt IE 8]><!-->
	<script src="_nonIe8.js"></script>
<!--<![endif]-->

**Make sure the src path reference begins with a slash (/scripts/myscript) and not use the root tilde reference. This (~) doesn’t seem to work within the conditional hthml.

Reference: http://www.impressivewebs.com/conditional-comments/
Reference: http://reference.sitepoint.com/css/conditionalcomments

HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries. This is for Bootstrap 3 support.

<!--[if lt IE 9]>
	<script src="~/../Scripts/html5shiv-3.7.0.js"></script>
	<script src="~/../Scripts/respond.min-1.4.2.js"></script>
	<link href="~/../Content/bootstrap-glyphicons.css" rel="stylesheet" />
<![endif]-->

How to use Fiddler with localhost on Internet Explorer and Visual Studio

Filed under: Daily Computing — Duy Nguyen @ 1:42 pm
Tags: , , ,

If you’re debugging with IE In Visual Studio, change the web project properties to “Use Visual Studio Development Server.”

Then, instead of http://localhost:1234/MyApp/&#8230;,
use http://localhost.:1234/MyApp/… (it’s subtle, but notice the extra dot after localhost).

Blog at WordPress.com.