Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the best practices for cross-browser web sites? [closed]

People also ask

What are the common cross browser issues?

Outdated Browser Detection The issue here is that sometimes, upon using an older version of a browser, Javascript may fail to detect this browser. Developers occasionally run into this problem due to the use of obsolete java scripts. The solution to this is available in the form of the Modernizer.


Use a library like jQuery abstract away the differences in the DOM, AJAX and JavaScript.


Make sure you're keeping HTML, CSS and Javascript in separate files as much a possible. Mixing structure, presentation and behavior in your HTML file just makes finding and fixing problems harder.


Use Firebug in Firefox for:

  • Debugging/stepping through your JS.
  • Seeing how your stylesheets are being interpreted and hacking them up on the fly to see how to fix your problem.
  • See how many calls you are making for remote resources and how long they take.
  • Profile your code.

Chrome and IE8 have similar tools built-in that can be used for the same thing.

Opera and Safari (and IE) have Firebug Lite.


  1. Use CSS Reset on start of your stylesheet...

    You can get one here...

  2. Validate your code by w3c ...

    You can validate your code here by page link or simply copy paste page element