4
How to show the warning "Update your Browser" when the user browser does not support HTML5 tags or CSS3 properties?
One initiative that encourages this is the website http://www.updateyourbrowser.net/pt, but they provide a script for this.
It would be possible to do this without a javascript or jquery script, using only HTML5 and CSS3 techniques?
For example, if you use the tag <video>
or <audio>
putting a text inside it, before or after the tags <source>
, as in the example below, this text will only be shown when the browser does not support these tags, hence Html5. But I couldn’t find a good way to style that warning. I also don’t know if that warning would be the best way to do it.
<video id="aviso">
Desculpe mas seu navegador não dá suporte a HTML5
</video>
Even if it’s not possible, what’s the best way to do it with javascript/jquery?
You want to warn the user that their browser does not support HTML5 using HTML5?
– Daniel Santos
Yes @Daniel, as I just illustrated in my question. Could I please refresh the page for a better review? Thank you!
– Szag-Ot
An alternative they use is through Modernizr... http://www.linhadecodigo.com.br/artigo/3630/detectando-supporte-para-html-5.aspx
– MarceloBoni
No browser supports "HTML5"; several do, that is, features included in HTML5, such as VIDEO, CANVAS tags, etc. I suggest using Modernizr to detect specific features and show, for example, a popup (window.Alert) to warn in the negative case.
– Ricardo Peres
Thank you @Marcelobonifazio for the help. I’ll just wait to see if anyone knows a different, script-free technique. Otherwise, until now, this is the champion! Another interesting one, if you are interested in seeing, is this: https://github.com/burocratik/outdated-browser
– Szag-Ot
@Marcelo Bonifazio Post your comment as an answer.
– PauloHDSousa
@Ricardoperes I converted his reply to comment, because I did not give more explanations of how to do. Even so, you are right to say that "HTML5" does not exist. Each browser supports a different set of features.
– bfavaretto