Anirban
Anirban

Reputation: 589

Does ASP.NET MVC4 provide backward compatibility support for HTML5 controls ?

I am trying to create a web site by using the html5 input controls. (email,search, tel, date..etc).

Do MVC 4 automatically provide support for older browsers like IE 8 or the developer has to explicitly write the fallbacks to support those controls in older browsers ?

Like for a control, from the Mordernizr I can find whether it supports the control else fire a JQuery to show the calendar.

So, my question, using ASP.NET MVC 4 do we still have to write the fallbacks/workarounds to support in older browswer.

Please let me know.

Thanks,

Anirban

Upvotes: 2

Views: 2936

Answers (2)

WinFXGuy
WinFXGuy

Reputation: 1599

When you create a MVC4 project with Visual Studio, you will see modernizr-1.7.min.js file in your Scripts folder of the project. This script helps you to support old browsers by gracially downgrading the HTML sytax. You can find more information about modernizr here:

http://modernizr.com/

Upvotes: 3

Ruben
Ruben

Reputation: 699

HTML 5 won't work on older browsers so you would have to find a other way to achieve what you want to achieve. MVC 4 does not change any of that. I do know that MVC 4 has some buildin features to identify a browser which might help for making it compatibility across diffrent browser brands. But that is mostly to support mobile devices(Display modes). If you really want to use HTML 5 you have to accept the fact that older browsers wont be able to display everything the way it is suppose to. You might be interested in reading this article : http://html5tutorial.net/general/which-browsers-support-html5.html

Edit

MVC 4 will not detect if your browser will support the page. So it will not make a fallback either. MVC can tell you somewhat about what browser is being used etc but cannot know if it will be supported.

Upvotes: 1

Related Questions