when we develop a website is it also perfect for mobile view? if not then what changes requires if i want to develop for both desktop view and mobile view? please give me suggestions...
当我们开发一个网站它是否也适合移动视图?如果没有,那么如果我想开发桌面视图和移动视图,需要进行哪些更改?请给我建议......
3
Most of the desktop/small device browser's (client) send their device info in request header
.
大多数桌面/小型设备浏览器(客户端)在请求标头中发送其设备信息。
A server should recognize that. If it can recognize it can process the request as normal flow and delegate to proper/expected view
.
服务器应该认识到这一点。如果它能够识别它可以将请求作为正常流程处理并委托给正确/预期的视图。
One example flow can be like this:
一个示例流程可以是这样的:
Client - Deice: Android - Resolution: AxY - URL: URL
of the resource to GET
客户端 - Deice:Android - 解决方案:AxY - URL:要GET的资源的URL
Server: - I can recognize the device - I am preparing relevant UI for that device (html/jsp/php etc) - I have the resource for given URL
- I am preparing the request and sending it
服务器: - 我可以识别设备 - 我正在为该设备准备相关的UI(html / jsp / php等) - 我有给定URL的资源 - 我正在准备请求并发送它
Additionally Refer to Sterlok
s answer. That thing can guide you to prepare the view
.
另请参阅Sterloks答案。那件事可以指导你准备视图。
However most important part is to recognize the device (actually client)
and respond accordingly.
然而,最重要的部分是识别设备(实际上是客户端)并相应地做出响应。
For example, a Java EE
based web-application can achieve this using a Request Filter
.
例如,基于Java EE的Web应用程序可以使用请求筛选器实现此目的。
6
Responsive Web Design is what you're looking for:
响应式网页设计是您正在寻找的:
Wikipedia: http://en.wikipedia.org/wiki/Responsive_Web_Design
Google Search: http://www.google.com/search?q=responsive+web+design
Google搜索:http://www.google.com/search?q = reply pons+web +design
Some frameworks that aid in responsive web design:
一些有助于响应式网页设计的框架:
there are many others. Hopefully this should set you on the right track.
还有很多其他的。希望这会让你走上正轨。
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2012/09/05/69e7014fc8714d148e71651136fe1c29.html。