Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to defend the Web

How to defend the Web

We Web Developers focus most of the time on the 'Developers' part and sometimes forget the 'Web' Part.

We'll focus on the 'Web' part here and see how not to sink in the trap of taking shortcuts at the expense of the Web.

Shwetank Dixit

February 25, 2013
Tweet

More Decks by Shwetank Dixit

Other Decks in Technology

Transcript

  1. The web has always had a gun to its head

    And its always won so far ...
  2. about me Web Evangelist, Web Standards Team Member, W3C Mobile

    Web for Social Development Group Twitter: shwetank Email: [email protected]
  3. Also ... File browsers bugs if you find them http://www.opera.com/support/bugs/

    https://bugs.webkit.org/ https://bugzilla.mozilla.org/ http://crbug.com/ https://connect.microsoft.com/site/sitehome.aspx?SiteID=136
  4. (True) Story Time! India’s most reported site compatibility Issue for

    Opera http://my.opera.com/ODIN/blog/2009/11/05/the-lengths-to-go-to- to-get-a-site-fixed
  5. Apart from contacting sites • Option to Spoof as another

    UA String • Make fixes in site to make it more compatible though ‘browser.js’
  6. Why did we need such a team? • Bugs •

    Laziness of the sites • Bad Code / Coding techniques • Lack of knowledge of the issues at hand • Lack of empathy. Focus on the $$$
  7. Bugs • More than 99% site bugs • Less than

    1% browser bugs Understandable. Some sites recognized and fixed issues immediately
  8. Laziness / Forgetfullness • Some UI library has a bug

    • Bug breaks Opera. • Newer version of Library fixes this issue • But site still using old version of the Library
  9. You know why every browser lies in their UA Strings?

    To get around stupid browser sniffing code
  10. Case Study: Release of Opera 10 UA String example for

    O10 Alpha: Opera/10.00 (Windows NT 5.1; U; en) Presto/2.2.0
  11. When Opera 10 finally released We made the UA String

    say ‘Opera/9.80’ instead of ‘Opera/10.00’ to get around this
  12. To this day, a major global shopping site browser sniffs

    and give Opera faulty code If you mask the UA String to that of Firefox or IE, then Opera gets correct code, and site works
  13. Exceptions for browser sniffing • Do it *rarely* (Honestly try

    everything else before settling for it). • Only Do it to address a bug • Only targeting a particular version of a particular browser • Keep in mind future versions of browser can fix the issue. • Always offer a fallback
  14. Feature Detection “I don’t care what browser you are. If

    you support the right stuff, I’ll send the you the right code”
  15. I’m not saying stop using bootstrap and such, but ...

    Put some effort into at least making it look a little different
  16. Stay up to date on the latest web techs and

    techniques Don’t need to use everything ... but be aware of the techniques and know how to use them when required
  17. Also, read Up! A List Apart .Net Mag Dev Opera

    HTML5 Rocks CSS-tricks webplatform.org coding.smashingmagazine.com
  18. Cross Browser testing services • Adobe Browserlab • crossbrowsertesting.com •

    MS Superpreview • browserstack • browserling More Info Here: http://www.smashingmagazine.com/2011/08/07/a-dozen-cross-browser-testing-tools/
  19. As technology professionals, we need to do out part in

    helping everyone have the chance to be successful. Our part is to make all our applications and products accessible to people with disabilities.
  20. Technology and applications must keep them in mind too, so

    that they too can have a chance to be successful
  21. General Observation Some amount of parallels between web accessibility best

    practices and mobile web development best practices
  22. General Observation Some amount of parallels between web accessibility best

    practices and mobile web development best practices http://www.w3.org/WAI/mobile/experiences http://www.w3.org/WAI/mobile/
  23. General Observation Most web accessibility best practices are not difficult

    to learn ... you just need to care to implement them http://www.w3.org/TR/WCAG20/
  24. Personal Observation If a Web Dev takes accessibility seriously, there

    is a higher chance of him/her being a high quality developer
  25. So how to we defend the Web? We’re not all

    the same We’re all in this together
  26. So how to we defend the Web? We’re not all

    the same We’re all in this together Lets not block access to anyone, lets give everyone a chance to use websites
  27. So how to we defend the Web? We’re not all

    the same We’re all in this together Lets not block access to anyone, lets give everyone a chance to use websites The Web is World Wide, and its supposed to be for everyone
  28. So how to we defend the Web? Speak Up (diplomatically)

    against things which hurt it! (Especially if you’re working in a team or under a manager)