How do I tell if the Browser supports PHP 5?
Posted: Sun Nov 07, 2010 8:22 pm
I do not understand why there is apparently no agreed upon way to determine if the browser that you are generating code for is HTML5 compatible. I asked this in another forum and got back a comment that HTML5 is supposed to be backwards compatible, which is ridiculous. Even if I limit my HTML5 functionality to tags and attributes that are supported by HTML 4.1 the content of the page is still different and may be misunderstood by back-level browsers. And if I do limit my HTML to tags and attributes that are supported by HTML 4.1 what is the point? I might as well leave the page in HTML 4.1. But I cannot find anything anywhere on the web about how to tell from PHP whether it is safe to send HTML5 to the browser. The only useful comment I have received is that I can use the non-standard browser-side comment tags for identifying the browser support to enclose the HTML5-only code.
The "dive into HTML5" page tells me how Javascript can tell whether the browser it is running on supports various features of HTML5, but I have to get the web page to the browser before the Javascript can run.
The "dive into HTML5" page tells me how Javascript can tell whether the browser it is running on supports various features of HTML5, but I have to get the web page to the browser before the Javascript can run.