in

JAVASCRIPT BROWSER COMPATIBILITY

In this tutorial we will be discussing about JavaScript browser compatibility which entails how to ensure your script is compatible with the web browser. In our previous tutorial we discussed about JavaScript debugging and we highlighted all the steps that can be used to debug JavaScript codes and also avoid making errors when coding. if you haven’t gone through the tutorial you can do so using the link below

Read previous tutorial on: Introduction To JavaScript Debugging

JAVASCRIPT BROWSER COMPATIBILITY

It is very much important to understand how your web page script appears in different browsers and also have an idea of the browser your web page script is going to be run on when developing the web page. A clear understanding of the browser type will help you develop web pages that will be fully compatible with the web browser.

Knowing the browser involves understanding the browser properties and to check this properties we can employ the help of the built-in navigator object

NAVIGATOR PROPERTIES

below shows the list of navigator properties that can be implemented on a web page to identify browsers clients.

S/N PROPERTIES PROPERTY DESCRIPTION
1 language This property is used to hold the web browser language abbreviation
2 platform[] This hold the platform for which the web browser was built
3 mimTypes[] This holds all the client supported MIME
4 appVersion This hold the version of the browser application
5 plugins[] This holds all plugins that’s present on the browser client
6 appCodeName This holds the browser code name.
7 userAgent[] This holds all the version of the browser with code names which is used to identify the browser client

NAVIGATOR METHODS

These are some of the methods used to access some of the properties of the web client

S/N METHOD METHOD DESCRIPTION
1 taintEnabled() This method is used to check if taint is enabled on the client
2 Plugings.refresh This makes newly installed plugins available
3 javaEnabled() This method is used to check of javascript is enabled on the client

What do you think?

javascript debugging

Introduction To JavaScript Debugging

html and css book

HTML and CSS Book For Designing and Building Websites By John Wiley