![]() In case you already use Fiddler, maybe you want to skip the “why”, and go to “requirements” and “how to”. But first I needed to find out how to use it, in order to feel that it belongs to my development tools. And now I wouldn’t want to miss it anymore. That changed when I’ve started developing a dataset PCF. After all, I had the “PCF Debug Harness”. I thought that for daily debugging during development, it’s not reliable enough. But at first I thought, that’s more for ocasionally debugging, like troubleshooting on production environment. I’ve saw the blogs, videos and webcasts from the brilliant Scott Durow, Natraj Yegnaraman and Ivan Ficko. If ( !!document.createElement( " video").You might have heard about using Fiddler AutoResponder to debug PCFs. This practice is called feature detection. If you wanted to test the browser’s ability to deliver video and audio via HTML5, you could actually attempt to create these elements via JavaScript, and see if the browser understands them. Rather than trying to guess what a browser is capable of by sniffing its user agent string (which will fail you eventually), it is much wiser to actually test features directly in the browser. ![]() This is because the site puts the user in one of two categories: an iPad user, or a Flash-enabled user. Rather than seeing an HTML5 experience, we’re instead asked to download Flash. If we disable plugins, or visit MSNBC from a device/browser that doesn’t have Flash, we would expect it to attempt a plug-in-free experience. Most modern browsers include the ability to easily change this value from their development tools, which some users take advantage of to get around poorly-developed websites. The user agent string is not immutable – it is a read-write value that is easily changed by plugins, or even the user. These are just a couple examples of why browser sniffing is not a best practice. While this test will find values like "MSIE 8.0" and "MSIE 9.0", it will not identify the latest version of Internet Explorer, which identifies itself as "MSIE 10.0", since only one digit is expected before the period. This pattern looks for a single digit, followed by a period, followed by any number of additional digits. The user agent string is tested for a pattern that attempts to target the version number. This method consists of examining the navigator object for certain patterns or values. One method, which unfortunately is somewhat popular, is browser sniffing. There are two methods used to determine what the user’s browser and device are capable of. Step 3: Get rid of browser sniffing methods In addition, there are a number of great tools that can break down this workload, such as SASS and Compass, -prefix-free, or even CSS Snippets in the upcoming Visual Studio 2011.Īlso, if you’re working predominantly in JavaScript and would like to save time determining which features are supported by your client’s browser, review the instructions in A Best Practice for Programming with Vendor Prefixes on the IEBlog. While more verbose but the benefits to broad browser feature support certainly outweigh the extra typing involved. One way to ensure this is to include the HTML5 doctype at the top of your document: In order to use the HTML5 elements we’ll be utilizing below, you’ll first need to ensure that you are operating in standards mode. Step 1: Declare Standards mode and valid markup for modern browsers ![]() Fiddler provides a great way for testing changes without the risk of breaking your live site. If you have direct access to your own site, you can ignore Fiddler, and work directly with your files. ![]() This tool allows me to modify remote files as though they were on my local machine. To modify the files of MSNBC, I will be using a proxy application known as Fiddler. It breaks down to two things: styles and scripts. Today we’re going to work with a MSNBC plug-in-free experience for rich media. I’ll show you how to do this in a few steps below by writing code that works well in all modern browsers. As more browsers adopt the plug-in-free approach, now is a good time to start thinking about it. If you’ve built a plug-in-free browsing experience for the iPad, a few changes will make it ready for the new IE10 plug-in-free experience on Windows 8.
0 Comments
Leave a Reply. |