문제

I'm developing a website and want to provide a mobile and desktop friendly experience to the user.

Coming from base html5/css/js development, I know enough css tricks, mobile first techniques, liquid layouts and media queries to get along fine but to optimize the solution even more and taking into consideration that I'm currently starting to work with .net/mvc(incl. razor) I'm looking for new options.

I've read about device detection techniques (currently favoring http://51degrees.codeplex.com/ ) and now I'm trying to figure out the options I have to optimize my website for all users.

I don't want mobile users to load the large versions of images and unnecessary scripts/stylesheets/background images etc. and I don't want to overwrite all mobile stylesheets as in a "mobile first" approach.

As I have just started working / learning how to work with the MVC pattern I'm asking you: Is it possible with the MVC pattern / development to build one combined website (not a desktop and a mobile version) and include javascript, image urls, stylesheets etc. based on the user client / device using "if else" and an option to let the user switch to the full version on demand.

도움이 되었습니까?

해결책

You could build seperate Mobile Views for your Actions and use them if the site is called from a mobile devide or use the Default View is called from a desktop.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top