22
Hacking your way through website issues with F12 Developer Tools Katrien De Graeve Developer Evangelist – Microsoft BeLux http://blogs.msdn.com/katriend/ @katriendg @ Multi-mania 24 May 2011

Multi-mania: Hacking your way through website issues with F12 devtools

Embed Size (px)

DESCRIPTION

Slides from Multi-mania session on Internet Explorer 9 developer tools

Citation preview

Page 1: Multi-mania: Hacking your way through website issues with F12 devtools

Hacking your way through website issues with F12 Developer Tools

Katrien De GraeveDeveloper Evangelist – Microsoft BeLuxhttp://blogs.msdn.com/katriend/@katriendg

@ Multi-mania24 May 2011

Page 3: Multi-mania: Hacking your way through website issues with F12 devtools

Agenda

• IE9 F12 Developer tools overview• Validation and standards mode• HTML and CSS • Script, debugging and console,

profiling• Network and performance

Page 4: Multi-mania: Hacking your way through website issues with F12 devtools

F12 Overview

• New in Internet Explorer 9– Console tab– Network tab– Performance– Change User

Agent string

Page 5: Multi-mania: Hacking your way through website issues with F12 devtools

DEMOF12 DEVTOOLS OVERVIEW

Page 6: Multi-mania: Hacking your way through website issues with F12 devtools

Standards and validation

• Internet Explorer Document mode• HTML5 page

<!DOCTYPE html><html lang="en"><head> <title></title> <meta charset="utf-8"></head><body>

</body></html>

Page 7: Multi-mania: Hacking your way through website issues with F12 devtools

DEMOVALIDATION & HTML5

Page 8: Multi-mania: Hacking your way through website issues with F12 devtools

HTML and CSS

• DOM tree• Select elements• See how elements are inherited and

overridden, trace styles• Switch rules off and on• Change rules• Edit and save HTML, style sheets• Save back to local file

Page 9: Multi-mania: Hacking your way through website issues with F12 devtools

DEMOHACKING HTML & CSS

Page 10: Multi-mania: Hacking your way through website issues with F12 devtools

JavaScript

• Format minified JavaScript• Debug & Breakpoints– Conditional breakpoints–Watch– Hover over values

• Console– Logging – Profiling

Page 11: Multi-mania: Hacking your way through website issues with F12 devtools

Profiling code

• Find performance hogs quickly• Check the call stack• Save the report to CSV• Functions view vs. Call Tree view• Add other columns with right-click• Jump to source view

Page 12: Multi-mania: Hacking your way through website issues with F12 devtools

DEMOSCRIPT, PROFILING, CONSOLE

Page 13: Multi-mania: Hacking your way through website issues with F12 devtools

Network

• Discover slow requests• Examine Headers• View Cookies• Examine Requests and Responses• Find errors

Page 14: Multi-mania: Hacking your way through website issues with F12 devtools

Network Tab

• A subset of Fiddler, and a little different• Multiple issues could be found

– Network, server, caching, mime-type, resource location

• Green - onDomContentLoaded• Red – OnLoad event

Page 15: Multi-mania: Hacking your way through website issues with F12 devtools

F12 Network Tab compared to Fiddler

F12 Network Tab Fiddler

Display cache and network requests Display and modify only network requests

Shows downloads from current process Shows traffic from all processes

6-connections-per-host limit 12-connections-per-proxy limit

Shows post-decryption HTTPS traffic Decrypts HTTPS traffic via “man-in-the-middle” approach

Excellent JavaScript Formatter Plugin (weak)

Less explicit mixed-content detection

Exports F12 NetworkData.xml Imports F12 NetworkData.xml

Page 16: Multi-mania: Hacking your way through website issues with F12 devtools

DEMONETWORK

Page 17: Multi-mania: Hacking your way through website issues with F12 devtools

Recommendations

• Try out IE10 today• Test your sites on IE9– User UA string changer– Play with document mode, test in IE7 and

IE8 mode

• Validation• Check for warnings in the Console• Test page as a different browser

(sniffing issue)

Page 18: Multi-mania: Hacking your way through website issues with F12 devtools

RESOURCES

Page 19: Multi-mania: Hacking your way through website issues with F12 devtools

Try it out

• Try out IE10 Platform Preview:– http://ietestdrive.com/

• Download IE9: – http://msdn.microsoft.com/ie/

• Read the IE Internals blog: – http://blogs.msdn.com/b/ieinternals/

• Demos Beauty of the Web:– http://www.beautyoftheweb.com

Page 21: Multi-mania: Hacking your way through website issues with F12 devtools

Stay up to date with MSDN Belux• Register for our newsletters and stay up to date:

http://www.msdn-newsletters.be– Technical updates– Event announcements and registration– Top downloads

• Follow our bloghttp://blogs.msdn.com/belux

• Join us on Facebookhttp://www.facebook.com/msdnbehttp://www.facebook.com/msdnbelux

• LinkedIn: http://linkd.in/msdnbelux/ • Twitter: @msdnbelux

Download MSDN/TechNet Desktop Gadget

http://bit.ly/msdntngadget

Page 22: Multi-mania: Hacking your way through website issues with F12 devtools

THANK YOU