I want to make a normal and HTML five version of my website. I would like the person's browser to automatically detect which one it should use based upon what the browser supports and redirect to the correct version. Does anyone know how to do this?
Your index.html can be a blank page with some javascript to do the redirect.
window.location = "http://www.site.com"
Testing for HTML5 is a bit more complicated.
Ergh... I don't know anything about web development. I was hoping for something simple.
Develop games in your browser. Powerful, performant & highly capable.
By HTML5 version, do you mean an actual website using html5 features, or just a C2 project for the entire site.
Davioware helped me out in chat. Anyone who'd like to test the results with whatever browser they have (especially interested in mobile and older browsers), it's at http://www.loot-pursuit.com/redirect/
It should go to loot-pursuit.com/html with a C2 project that says "HTML" if there is no html5 support, loot-pursuit.com/html5 with a C2 project that says "HTML5" if there is.
I'm also interested to know if at any point the browser prompts you to run or enable scripts, or if you see the Loot Pursuit logo anywhere, which should show as a backup if the page halts for any reason.
Thanks again, Davioware!
Works great. I use Chrome.
If I disable Javascript I get this message:
"Your browser does not appear to support HTML5. Try upgrading your browser to the latest version. What is a browser? "
So it's ok.
I tried with my good old not upgraded internet explorer 8 that doesn't support sh*t, and I got properly redirected to the html version (: