- WAP Development Tips
- Tip 1: Configuring a Web Server to Serve WAP Files
- Tip 2: Forcing the Display of a Banner
- Tip 3: Using Tables
- Tip 4: Adding a Link to Auto_Dial a Number
- Tip 5: Building a Common Start Page for Web and Wireless Users
- Conclusion
- Suggested Resources
Tip 5: Building a Common Start Page for Web and Wireless Users
You may find yourself wanting to build a site that supports both wired and wireless Web users. To do this, your home page will need to automatically detect the browser type accessing your site and generate the appropriate output (either HTML or WML) based on this detection. To do this, you need to analyze the HTTP_USER_AGENT variable, using your CGI/scripting tool of choice (Perl, PHP, ASP, and so on). An up-to-date list of WAP browser user agent strings is maintained at http://allnetdevices.com/faq/useragents.php3. A common method of checking these strings is to simply compare the first few characters of the user agent; if it matches one in the list, then it's a WAP browser.