Browser Detection

The PHP programmer is almost spoiled when it comes to Web development because PHP is largely browser- and platform-independent. This means that the code you write functions similarly regardless of the operating system of the computer on which it is running or the Web browser that the client (the person/computer viewing the Web site) is using.

The same cannot be said for other aspects of Web development. HTML code will look slightly different from one browser to the next. Sec tions of JavaScript code will work or not work depending upon whether the page is being viewed with Internet Explorer 5 on a Macintosh or on Windows. And with the two major browsers being controlled by megacorporations less interested in supporting standards ...

Get PHP Advanced for the World Wide Web: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.