Information Technology Reference
In-Depth Information
6
Chapter
Handling Different
Browser Platforms
So far, we've discussed ways to detect the type of device that is accessing your web
page or application and to deal with it appropriately. This has involved special CSS files,
formatting concerns, and more. Like any good baker will tell you, however, it is not
always the wisest of ideas to keep all of your eggs in one basket. That is why, in this
chapter, we're going to take a step back and discuss methods that you can use to
understand what device is accessing your service and to act appropriately.
The reason for this is simple: Not one solution will fit all problems. For instance, you
might need to allow mobile users to access a web application and you might find it
possible to format pages that look great on the desktop as well as on a phone. For
extremely simple layouts, this is often what developers do. However for more complex
systems, one might need to create a completely separate website. The middle ground is
to build one HTML document that can look good on the desktop, tablet, or phone. In
this chapter, we're going to give you the tools you need to figure out what device is
looking at your page, and we'll provide some ideas on how your page can react to each
device. After all, just as no two websites are exactly alike—although similar—no two
devices will behave exactly alike (but thankfully, as with websites, there are similarities).
META Tags and the Viewport
We've discussed many things about HTML that are hidden to normal users—the
different tags that are used, the different sections, such as the head and body , and even
how things like CSS and JavaScript can be embedded into an HTML document.
However META tags or elements are special in that, while they aren't shown to the user,
they do generally impact the user's experience with the how the page is displayed or
formatted.
85
 
Search WWH ::




Custom Search