SlideShare ist ein Scribd-Unternehmen logo
1 von 51
Platinum Sponsors
Gold Sponsors
Untying the Knots
of Web Development
with Internet Explorer
Sarah Dutkiewicz
sarah@cletechconsulting.com
Agenda
• Identify problems
• Come up with solutions or recommendations on how to move forward
• Additional Resources
Oh, the Knots!
Random Spacing Issues
• Phantom whitespace –
spaces and lines (IE7
and IE8)
• Why this is bad: Not
easily traceable.
Usually impacted layout
quite noticeably, but
only in Internet
Explorer.
• More on this problem:
Commonly seen in
Quirks mode.
Whitespace Issues - Explained
• The height attribute tells IE that the DIV has a layout.
• Because of the layout, the box gets a minimum height equal to the line-height.
• With line-height not explicitly set, it defaults to the font-size for the box.
• Internet Explorer gives HTML elements a layout flag that can be checked
through the read-only hasLayout property.
• Related Reading: hasLayout property (Internet Explorer)
Elements where hasLayout is true
• Images
• Tables – including rows and cells
• Horizontal rule (hr)
• Input elements
• Marquee
• Framesets & frames
• Objects
• Applets
• Plugins
CSS Properties that Trigger
hasLayout
• display: inline-block
• height & width
• float: left & right
• position: absolute
• zoom
• -ms-writing-mode: tb-rl
Workarounds for the layout bug
• Find a way to get hasLayout computed to false – hard to do though because
once IE sets this true, it can’t be changed back.
• Try to avoid using elements or CSS properties that trigger hasLayout.
• Set the line-height to 0.
IE Margins & Padding Issues
• Why this is bad: Nobody chose to implement the standard the same way;
Internet Explorer was the furthest away.
• Internet Explorer interpreted the box model in its own way, causing margins and
padding to display much differently.
Fixed: Internet Explorer Box Model
Bug
• Internet Explorer 6 introduced “standards-compliant” mode.
• Internet Explorer for the Mac was not affected by this bug.
Quirks Mode Headaches
• Allowed browsers to render HTML and CSS even if it didn’t conform to
standards
• Introduced all sorts of bugs
• Allows us to recreate the IE box model bug
• Images and other inline content vertically aligns differently
• Font style inheritance in tables did not always happen
• Solved by:
 X-UA-Compatible
 Proper DOCTYPE declaration
User Agent Sniffing
• Using JavaScript to sniff the User Agent as browser
detection
• Why this is bad: Can easily be spoofed. Not always
accurate.
Tools
Making it easier to develop for Internet Explorer
Modern.IE
• http://modern.ie
• Code with Standards - http://www.modern.ie/en-us/cross-browser-best-practices
• BrowserStack testing trial
• Scan a Site
• Virtualization – test versions of IE with pre-built VMs
Modern.IE – Cross Browser Best
Practices
• 20 tips for building modern sites while supporting old versions of IE by Dave
Methvin (jQuery) and Rey Bango (Microsoft)
• Words of Wisdom include…
 Sites don’t need to render the same across all browsers.
 Test in multiple browsers while developing. Consider using a tool such as
BrowserStack.
 Understand the backward-compatibility limits of HTML5 tags.
 Fully prefix vendor-specific CSS properties to future-proof them.
 Solve compatibility problems with valid CSS rules, not CSS parser hacks.
 Delay-load non-essential JavaScript scripts.
Use a solid template as a base
• HTML5 Boilerplate is an example where rules have been added to work across
multiple browsers and downgrades gracefully for older browsers.
Target stable standards
• Experimental standards are just that – subject to change.
• Stable standards = stable site = happier end users
Avoid Quirks Mode
• Use a standard DOCTYPE.
• When in doubt, use the simplest of
<!DOCTYPE html>
Test in Multiple Browsers
• Do this while developing to ensure cross-
browser experiences.
• BrowserStack can provide an environment for
testing multiple browsers. See Modern.IE for
the latest deals they may have with
BrowserStack.
• Take advantage of modern tooling in the
browsers when debugging issues.
• If working with older browsers, look for plugins
for the modern tooling equivalent – such as
Firebug for Firefox.
• Good rule of thumb: current version and the
most recent prior version
CSS on top, JavaScript on the bottom
• CSS in the head of HTML to fetch as
early as possible
• JavaScript goes through the following
browser cycle:
 Retrieve the JavaScript file
 Parse the JavaScript file
 Execute the JavaScript file
• Putting JavaScript at the bottom allows
the page to be rendered and appear to
be loaded before scripts are fully loaded.
CSS
Content
JavaScript
CSS Tips
• Avoid !important
• Be familiar with the cascade rules
 More than just class and id selectors
 Understand relationship, tag, and attribute selectors
• Avoid CSS hacks (such as the _ or the *tag IE hacks)
 Use version-specific classes
Feature Detection, instead of Browser
Detection
• Just say NO to User Agent sniffing
• Modernizr is recommended easiest way for feature detection.
Modern.IE - Virtualization
• Virtual machines available with Internet Explorer on various operating systems,
targeting various hypervisors
• Hypervisor support includes:
 VirtualBox for Linux
 VirtualBox, VMWare Fusion, and Parallels for Mac
 Hyper-V, Virtual PC, VirtualBox, VMWare Player for Windows
• IE versions include:
 IE6 on Windows XP
 IE7 on Vista
 IE8 on Windows XP or Windows 77
 IE9 on Windows 7
 IE10 on Windows 7 & Windows 8
 IE11 Developer Preview on Windows 7 & Windows 8.1
• Related Resource: Rey Bango – Making Internet Explorer Testing Easier with new IE
VMs
F12 Developer Tools
• Internet Explorer’s built-in developer tools
• New look-n-feel in Internet Explorer 11 Preview
 Easier & faster workflow
 UI Responsiveness tool
 Screen & GPS emulation
 Meaningful memory analysis
 Timeline of overall usage
 Orphaned elements where memory can be reclaimed
Compat Inspector
• http://ie.microsoft.com/testdrive/HTML5/CompatInspector/
• JavaScript-based testing tool that analyzes a website. Identifies problems, and
makes suggestions on how to improve your site.
• Developed during IE9
• Designed to help migrate to IE9 and above
• User Guide:
http://ie.microsoft.com/testdrive/HTML5/CompatInspector/help/post.htm
Compat Inspector
• Place the reference to its JavaScript file before any scripts you want to test.
<script src=http://ie.microsoft.com/testdrive/HTML5/CompatInspector/inspector.js>
</script>
• Can also use Fiddler to inject Compat Inspector through a snippet in Fiddler
Script
Demo
Compat Inspector in Fiddler
Compat Inspector with Fiddler
Compat Inspector with Fiddler
Related Resource: Use feature detection
Compat Inspector with Fiddler
Verifying Issues in Compat Inspector
• Verifiers can emulate legacy behavior
• Check the Verify box and then refresh the page.
• Multiple issues can be verified at once.
Debugging Issues in Compat Inspector
• Check the Debug checkbox.
• Start up the F12 Developer Tools.
• Switch to the Script tab.
• Click “Start debugging”.
Out-of-date JavaScript Libraries
• Detects the presence of common libraries and notes the versions in use
• Provides the ability to verify functionality with the latest version of the detected
library
Compat Inspector with Fiddler
Putting Tested Code Live
• Remove Compat Inspector script reference before setting pages live.
• Use Fiddler to avoid using the script reference in the code in the first place.
• Compat Inspector is only meant for a dev environment.
Compat Guides
• http://msdn.microsoft.com/library/ie/hh771831(vs.85)
Testing on BrowserStack.com
Testing on BrowserStack.com
Internet Explorer 10 Guide for
Developers
• http://msdn.microsoft.com/library/ie/hh673549.aspx
 Compatibility
 CSS
 DOM
 F12 Developer Tools
 HTML5
 IndexedDB
 JavaScript
 SVG
 Performance
 Windows 8 integration
Internet Explorer 10 Developer Guide
• Topics include:
 Compatibility Modes
 Quirks Mode
 CSS3 Exclusions
 Debugging Web Workers in F12 Developer Tools
 AppCache
 Web Workers
 IndexedDB
 Filter effects for SVGs
 Windows 8 integration
Internet Explorer 10 Developers Guide
– Link Preview Example
• Extends Windows 8 share experience
• Requirements for a link preview:
 Title for the webpage – no longer than 160 characters
 Description – no longer than 160 characters
 Thumbnail – URL no longer than 2048 characters
<meta name=“title” content=“Cleveland Tech Events” /> or <title>Cleveland Tech
Events</title>
<meta name=“description” content=“What’s Happening in Cleveland’s tech community” />
<link rel=“image_src” href=“clevtechpreview.jpg” /> or
<meta name=“image” content=“clevtechpreview.jpg” />
<meta name=“thumbnail” content=“clevtechthumb.jpg” />
or
<meta property=“og:image” content=“clevtechthumb.jpg” />
WebPlatform.org
• http://www.webplatform.org/
• Convened by W3C, community-driven site with the goal to be the authoritative
source for web development documentation
• Supporters include:
 Adobe
 Facebook
 Google
 HP
 Intel
 Microsoft
 Nokia
 Mozilla
 Opera Software
WebPlatform.org - Tutorials
• Tutorials for implementing web technology
 Essentials
 Testing
 HTML
 CSS
 JavaScript
 SVG
• Tutorials on specific topics
 Audio
 Connectivity
 Device access
 Graphics (2D & 3D)
 Mobile
 Multimedia
 Offline & Storage
 Tools
WebPlatform.org - Documents
• Documents include:
 Beginners Guide
 General Web Concepts
 HTML
 CSS
 JavaScript
 DOM
 Accessibility
 SVG
 APIs
Additional Resources
• Twitter: @IEDevChat
• Internet Explorer Developer Guides
• Internet Explorer Compatibility Cookbooks
August 11th – 13th 2014
Same Place, Same Time

Weitere ähnliche Inhalte

Was ist angesagt?

WordPress Plugin Development
WordPress Plugin DevelopmentWordPress Plugin Development
WordPress Plugin Development
Adam Englander
 
Websites, Web Services and Cloud Applications with Visual Studio
Websites, Web Services and Cloud Applications with Visual StudioWebsites, Web Services and Cloud Applications with Visual Studio
Websites, Web Services and Cloud Applications with Visual Studio
Microsoft Visual Studio
 

Was ist angesagt? (20)

API Design Principles for Accelerated Development
API Design Principles for Accelerated DevelopmentAPI Design Principles for Accelerated Development
API Design Principles for Accelerated Development
 
Spring insight what just happened
Spring insight   what just happenedSpring insight   what just happened
Spring insight what just happened
 
Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017
 
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
 
WordPress Plugin Development
WordPress Plugin DevelopmentWordPress Plugin Development
WordPress Plugin Development
 
ASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTMASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTM
 
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens  SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
SenchaCon 2016: Being Productive with the New Sencha Fiddle - Mitchell Simoens
 
ASP.NET 5 Overview - Post Build 2015
ASP.NET 5 Overview - Post Build 2015ASP.NET 5 Overview - Post Build 2015
ASP.NET 5 Overview - Post Build 2015
 
SharePoint Development with the SharePoint Framework
SharePoint Development with the SharePoint FrameworkSharePoint Development with the SharePoint Framework
SharePoint Development with the SharePoint Framework
 
Developing WordPress Plugins : For Begineers
Developing WordPress Plugins :  For BegineersDeveloping WordPress Plugins :  For Begineers
Developing WordPress Plugins : For Begineers
 
Modular application development using unlocked packages
Modular application development using unlocked packagesModular application development using unlocked packages
Modular application development using unlocked packages
 
Writing a Wordpress plugin from scratch
Writing a Wordpress plugin from scratchWriting a Wordpress plugin from scratch
Writing a Wordpress plugin from scratch
 
SenchaCon 2016: Developing and Delivering Quality Code, Frequently - Neil Manvar
SenchaCon 2016: Developing and Delivering Quality Code, Frequently - Neil ManvarSenchaCon 2016: Developing and Delivering Quality Code, Frequently - Neil Manvar
SenchaCon 2016: Developing and Delivering Quality Code, Frequently - Neil Manvar
 
jQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript TestingjQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript Testing
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
 
Get responsive with Galen
Get responsive with GalenGet responsive with Galen
Get responsive with Galen
 
Websites, Web Services and Cloud Applications with Visual Studio
Websites, Web Services and Cloud Applications with Visual StudioWebsites, Web Services and Cloud Applications with Visual Studio
Websites, Web Services and Cloud Applications with Visual Studio
 
APEX 5 Demo and Best Practices
APEX 5 Demo and Best PracticesAPEX 5 Demo and Best Practices
APEX 5 Demo and Best Practices
 
Techorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour MakeoverTechorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour Makeover
 
Getting Started with WordPress Plugin Development
Getting Started with WordPress Plugin DevelopmentGetting Started with WordPress Plugin Development
Getting Started with WordPress Plugin Development
 

Andere mochten auch

Andere mochten auch (8)

Unleashing the Power: A Lap Around PowerShell 3.0
Unleashing the Power: A Lap Around PowerShell 3.0Unleashing the Power: A Lap Around PowerShell 3.0
Unleashing the Power: A Lap Around PowerShell 3.0
 
Three's Company - Writing for the Desktop, Browser, and Phone
Three's Company - Writing for the Desktop, Browser, and PhoneThree's Company - Writing for the Desktop, Browser, and Phone
Three's Company - Writing for the Desktop, Browser, and Phone
 
Keeping an Open Mind About Open Source
Keeping an Open Mind About Open SourceKeeping an Open Mind About Open Source
Keeping an Open Mind About Open Source
 
Ignite Cleveland - "Marketing Your Events Online"
Ignite Cleveland - "Marketing Your Events Online"Ignite Cleveland - "Marketing Your Events Online"
Ignite Cleveland - "Marketing Your Events Online"
 
Web Analytics
Web AnalyticsWeb Analytics
Web Analytics
 
Py Con 2009 Pumping Iron Into Python
Py Con 2009   Pumping Iron Into PythonPy Con 2009   Pumping Iron Into Python
Py Con 2009 Pumping Iron Into Python
 
Keeping an Open Mind on Open Source
Keeping an Open Mind on Open SourceKeeping an Open Mind on Open Source
Keeping an Open Mind on Open Source
 
Consumer Camp - Featuring Surface, Xbox, SkyDrive, and Win Phone
Consumer Camp - Featuring Surface, Xbox, SkyDrive, and Win PhoneConsumer Camp - Featuring Surface, Xbox, SkyDrive, and Win Phone
Consumer Camp - Featuring Surface, Xbox, SkyDrive, and Win Phone
 

Ähnlich wie Untying the Knots of Web Dev with Internet Explorer

State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
dmethvin
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
Acquia
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterprise
Taylor Lovett
 

Ähnlich wie Untying the Knots of Web Dev with Internet Explorer (20)

State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
 
Web Tools for GemStone/S
Web Tools for GemStone/SWeb Tools for GemStone/S
Web Tools for GemStone/S
 
Test Automation with Twist and Sahi
Test Automation with Twist and SahiTest Automation with Twist and Sahi
Test Automation with Twist and Sahi
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX Developers
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Front end for back end developers
Front end for back end developersFront end for back end developers
Front end for back end developers
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPress
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
 
Become a Full Stack Web Developer (.NET) - Thisiswali
Become a Full Stack Web Developer (.NET) - ThisiswaliBecome a Full Stack Web Developer (.NET) - Thisiswali
Become a Full Stack Web Developer (.NET) - Thisiswali
 
Selenium for everyone
Selenium for everyoneSelenium for everyone
Selenium for everyone
 
Training presentation.pptx
Training presentation.pptxTraining presentation.pptx
Training presentation.pptx
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterprise
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 

Mehr von Sarah Dutkiewicz

Mehr von Sarah Dutkiewicz (20)

Passwordless Development using Azure Identity
Passwordless Development using Azure IdentityPasswordless Development using Azure Identity
Passwordless Development using Azure Identity
 
Predicting Flights with Azure Databricks
Predicting Flights with Azure DatabricksPredicting Flights with Azure Databricks
Predicting Flights with Azure Databricks
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for Developers
 
Azure DevOps for JavaScript Developers
Azure DevOps for JavaScript DevelopersAzure DevOps for JavaScript Developers
Azure DevOps for JavaScript Developers
 
Noodling with Data in Jupyter Notebook
Noodling with Data in Jupyter NotebookNoodling with Data in Jupyter Notebook
Noodling with Data in Jupyter Notebook
 
Pairing and mobbing
Pairing and mobbingPairing and mobbing
Pairing and mobbing
 
Intro to Python for C# Developers
Intro to Python for C# DevelopersIntro to Python for C# Developers
Intro to Python for C# Developers
 
Introduction to Testing and TDD
Introduction to Testing and TDDIntroduction to Testing and TDD
Introduction to Testing and TDD
 
Becoming a Servant Leader, Leading from the Trenches
Becoming a Servant Leader, Leading from the TrenchesBecoming a Servant Leader, Leading from the Trenches
Becoming a Servant Leader, Leading from the Trenches
 
NEOISF - On Mentoring Future Techies
NEOISF - On Mentoring Future TechiesNEOISF - On Mentoring Future Techies
NEOISF - On Mentoring Future Techies
 
Becoming a Servant Leader
Becoming a Servant LeaderBecoming a Servant Leader
Becoming a Servant Leader
 
The Polyglot Data Scientist - Exploring R, Python, and SQL Server
The Polyglot Data Scientist - Exploring R, Python, and SQL ServerThe Polyglot Data Scientist - Exploring R, Python, and SQL Server
The Polyglot Data Scientist - Exploring R, Python, and SQL Server
 
The importance of UX for Developers
The importance of UX for DevelopersThe importance of UX for Developers
The importance of UX for Developers
 
The Impact of Women Trailblazers in Tech
The Impact of Women Trailblazers in TechThe Impact of Women Trailblazers in Tech
The Impact of Women Trailblazers in Tech
 
Unstoppable Course Final Presentation
Unstoppable Course Final PresentationUnstoppable Course Final Presentation
Unstoppable Course Final Presentation
 
Even More Tools for the Developer's UX Toolbelt
Even More Tools for the Developer's UX ToolbeltEven More Tools for the Developer's UX Toolbelt
Even More Tools for the Developer's UX Toolbelt
 
History of Women in Tech
History of Women in TechHistory of Women in Tech
History of Women in Tech
 
History of Women in Tech - Trivia
History of Women in Tech - TriviaHistory of Women in Tech - Trivia
History of Women in Tech - Trivia
 
The UX Toolbelt for Developers
The UX Toolbelt for DevelopersThe UX Toolbelt for Developers
The UX Toolbelt for Developers
 
World Usability Day 2014 - UX Toolbelt for Developers
World Usability Day 2014 - UX Toolbelt for DevelopersWorld Usability Day 2014 - UX Toolbelt for Developers
World Usability Day 2014 - UX Toolbelt for Developers
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Untying the Knots of Web Dev with Internet Explorer

  • 1.
  • 3. Untying the Knots of Web Development with Internet Explorer Sarah Dutkiewicz sarah@cletechconsulting.com
  • 4.
  • 5.
  • 6.
  • 7. Agenda • Identify problems • Come up with solutions or recommendations on how to move forward • Additional Resources
  • 9. Random Spacing Issues • Phantom whitespace – spaces and lines (IE7 and IE8) • Why this is bad: Not easily traceable. Usually impacted layout quite noticeably, but only in Internet Explorer. • More on this problem: Commonly seen in Quirks mode.
  • 10. Whitespace Issues - Explained • The height attribute tells IE that the DIV has a layout. • Because of the layout, the box gets a minimum height equal to the line-height. • With line-height not explicitly set, it defaults to the font-size for the box. • Internet Explorer gives HTML elements a layout flag that can be checked through the read-only hasLayout property. • Related Reading: hasLayout property (Internet Explorer)
  • 11. Elements where hasLayout is true • Images • Tables – including rows and cells • Horizontal rule (hr) • Input elements • Marquee • Framesets & frames • Objects • Applets • Plugins
  • 12. CSS Properties that Trigger hasLayout • display: inline-block • height & width • float: left & right • position: absolute • zoom • -ms-writing-mode: tb-rl
  • 13. Workarounds for the layout bug • Find a way to get hasLayout computed to false – hard to do though because once IE sets this true, it can’t be changed back. • Try to avoid using elements or CSS properties that trigger hasLayout. • Set the line-height to 0.
  • 14. IE Margins & Padding Issues • Why this is bad: Nobody chose to implement the standard the same way; Internet Explorer was the furthest away. • Internet Explorer interpreted the box model in its own way, causing margins and padding to display much differently.
  • 15.
  • 16. Fixed: Internet Explorer Box Model Bug • Internet Explorer 6 introduced “standards-compliant” mode. • Internet Explorer for the Mac was not affected by this bug.
  • 17. Quirks Mode Headaches • Allowed browsers to render HTML and CSS even if it didn’t conform to standards • Introduced all sorts of bugs • Allows us to recreate the IE box model bug • Images and other inline content vertically aligns differently • Font style inheritance in tables did not always happen • Solved by:  X-UA-Compatible  Proper DOCTYPE declaration
  • 18. User Agent Sniffing • Using JavaScript to sniff the User Agent as browser detection • Why this is bad: Can easily be spoofed. Not always accurate.
  • 19. Tools Making it easier to develop for Internet Explorer
  • 20. Modern.IE • http://modern.ie • Code with Standards - http://www.modern.ie/en-us/cross-browser-best-practices • BrowserStack testing trial • Scan a Site • Virtualization – test versions of IE with pre-built VMs
  • 21. Modern.IE – Cross Browser Best Practices • 20 tips for building modern sites while supporting old versions of IE by Dave Methvin (jQuery) and Rey Bango (Microsoft) • Words of Wisdom include…  Sites don’t need to render the same across all browsers.  Test in multiple browsers while developing. Consider using a tool such as BrowserStack.  Understand the backward-compatibility limits of HTML5 tags.  Fully prefix vendor-specific CSS properties to future-proof them.  Solve compatibility problems with valid CSS rules, not CSS parser hacks.  Delay-load non-essential JavaScript scripts.
  • 22. Use a solid template as a base • HTML5 Boilerplate is an example where rules have been added to work across multiple browsers and downgrades gracefully for older browsers. Target stable standards • Experimental standards are just that – subject to change. • Stable standards = stable site = happier end users
  • 23. Avoid Quirks Mode • Use a standard DOCTYPE. • When in doubt, use the simplest of <!DOCTYPE html>
  • 24. Test in Multiple Browsers • Do this while developing to ensure cross- browser experiences. • BrowserStack can provide an environment for testing multiple browsers. See Modern.IE for the latest deals they may have with BrowserStack. • Take advantage of modern tooling in the browsers when debugging issues. • If working with older browsers, look for plugins for the modern tooling equivalent – such as Firebug for Firefox. • Good rule of thumb: current version and the most recent prior version
  • 25. CSS on top, JavaScript on the bottom • CSS in the head of HTML to fetch as early as possible • JavaScript goes through the following browser cycle:  Retrieve the JavaScript file  Parse the JavaScript file  Execute the JavaScript file • Putting JavaScript at the bottom allows the page to be rendered and appear to be loaded before scripts are fully loaded. CSS Content JavaScript
  • 26. CSS Tips • Avoid !important • Be familiar with the cascade rules  More than just class and id selectors  Understand relationship, tag, and attribute selectors • Avoid CSS hacks (such as the _ or the *tag IE hacks)  Use version-specific classes
  • 27. Feature Detection, instead of Browser Detection • Just say NO to User Agent sniffing • Modernizr is recommended easiest way for feature detection.
  • 28. Modern.IE - Virtualization • Virtual machines available with Internet Explorer on various operating systems, targeting various hypervisors • Hypervisor support includes:  VirtualBox for Linux  VirtualBox, VMWare Fusion, and Parallels for Mac  Hyper-V, Virtual PC, VirtualBox, VMWare Player for Windows • IE versions include:  IE6 on Windows XP  IE7 on Vista  IE8 on Windows XP or Windows 77  IE9 on Windows 7  IE10 on Windows 7 & Windows 8  IE11 Developer Preview on Windows 7 & Windows 8.1 • Related Resource: Rey Bango – Making Internet Explorer Testing Easier with new IE VMs
  • 29. F12 Developer Tools • Internet Explorer’s built-in developer tools • New look-n-feel in Internet Explorer 11 Preview  Easier & faster workflow  UI Responsiveness tool  Screen & GPS emulation  Meaningful memory analysis  Timeline of overall usage  Orphaned elements where memory can be reclaimed
  • 30. Compat Inspector • http://ie.microsoft.com/testdrive/HTML5/CompatInspector/ • JavaScript-based testing tool that analyzes a website. Identifies problems, and makes suggestions on how to improve your site. • Developed during IE9 • Designed to help migrate to IE9 and above • User Guide: http://ie.microsoft.com/testdrive/HTML5/CompatInspector/help/post.htm
  • 31. Compat Inspector • Place the reference to its JavaScript file before any scripts you want to test. <script src=http://ie.microsoft.com/testdrive/HTML5/CompatInspector/inspector.js> </script> • Can also use Fiddler to inject Compat Inspector through a snippet in Fiddler Script
  • 34. Compat Inspector with Fiddler Related Resource: Use feature detection
  • 36. Verifying Issues in Compat Inspector • Verifiers can emulate legacy behavior • Check the Verify box and then refresh the page. • Multiple issues can be verified at once.
  • 37. Debugging Issues in Compat Inspector • Check the Debug checkbox. • Start up the F12 Developer Tools. • Switch to the Script tab. • Click “Start debugging”.
  • 38. Out-of-date JavaScript Libraries • Detects the presence of common libraries and notes the versions in use • Provides the ability to verify functionality with the latest version of the detected library
  • 40. Putting Tested Code Live • Remove Compat Inspector script reference before setting pages live. • Use Fiddler to avoid using the script reference in the code in the first place. • Compat Inspector is only meant for a dev environment.
  • 44. Internet Explorer 10 Guide for Developers • http://msdn.microsoft.com/library/ie/hh673549.aspx  Compatibility  CSS  DOM  F12 Developer Tools  HTML5  IndexedDB  JavaScript  SVG  Performance  Windows 8 integration
  • 45. Internet Explorer 10 Developer Guide • Topics include:  Compatibility Modes  Quirks Mode  CSS3 Exclusions  Debugging Web Workers in F12 Developer Tools  AppCache  Web Workers  IndexedDB  Filter effects for SVGs  Windows 8 integration
  • 46. Internet Explorer 10 Developers Guide – Link Preview Example • Extends Windows 8 share experience • Requirements for a link preview:  Title for the webpage – no longer than 160 characters  Description – no longer than 160 characters  Thumbnail – URL no longer than 2048 characters <meta name=“title” content=“Cleveland Tech Events” /> or <title>Cleveland Tech Events</title> <meta name=“description” content=“What’s Happening in Cleveland’s tech community” /> <link rel=“image_src” href=“clevtechpreview.jpg” /> or <meta name=“image” content=“clevtechpreview.jpg” /> <meta name=“thumbnail” content=“clevtechthumb.jpg” /> or <meta property=“og:image” content=“clevtechthumb.jpg” />
  • 47. WebPlatform.org • http://www.webplatform.org/ • Convened by W3C, community-driven site with the goal to be the authoritative source for web development documentation • Supporters include:  Adobe  Facebook  Google  HP  Intel  Microsoft  Nokia  Mozilla  Opera Software
  • 48. WebPlatform.org - Tutorials • Tutorials for implementing web technology  Essentials  Testing  HTML  CSS  JavaScript  SVG • Tutorials on specific topics  Audio  Connectivity  Device access  Graphics (2D & 3D)  Mobile  Multimedia  Offline & Storage  Tools
  • 49. WebPlatform.org - Documents • Documents include:  Beginners Guide  General Web Concepts  HTML  CSS  JavaScript  DOM  Accessibility  SVG  APIs
  • 50. Additional Resources • Twitter: @IEDevChat • Internet Explorer Developer Guides • Internet Explorer Compatibility Cookbooks
  • 51. August 11th – 13th 2014 Same Place, Same Time

Hinweis der Redaktion

  1. Title slide for anyone looking to use this years logo.
  2. Please take a brief opportunity and thank our platinum and gold sponsors. They have invested a lot of time and money into making That Conference the success it is.
  3. Image taken from: http://en.wikipedia.org/wiki/File:W3C_and_Internet_Explorer_box_models.svg
  4. At the end of your presentation we would be grateful if you could help us announce next years date.