HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming
Receive the tools necessary to be the rock star of your field. Our 12-month program teaches you the evolving world of multi-channel marketing as well as the complex issues and opportunities found in the industry.

ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!
Download and Activate to enter!

Web development can be a daunting task, even for specialists. There is a lot of information to absorb and a lot of technologies to learn in order to manage a superior website. When trying to learn the ropes, developers need a reliable source to introduce new ideas that can be easily implemented. When working on large projects, even web veterans may run into a technology or an aspect of a technology that they are unfamiliar with.

Learn More!


Download to Enter
| Contest Rules

Tutorials | Forums

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 11th, 2012, 12:53 PM
MIDIman MIDIman is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 9 MIDIman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 16 m 7 sec
Reputation Power: 0
One webpage - targeting multiple devices and browsers...

I have a single HTML page that needs to work across a number of devices and browsers. The page only needs to react in one of two ways - with Flash (desktop) or without (mobile).

On the desktop side, we have all of the usual browsers working perfectly fine. Flash is embedded via swfobject - it replaces any of the content specifically related to mobile.

For mobile, we are using CSS media queries (screen width) to target different devices on the mobile side. That seems to work OK, but I want to go a step further with it.

For instance, when viewing the page with an android tablet, which has Flash installed, they are fed Flash - which I don't want.

Essentially, if the browser has Flash installed, the SWF will load. If it doesn't, then the user is fed the Mobile experience.

I would like to change this so that I can target ANY mobile device to load the mobile experience and target all desktop browsers to load the Flash experience.

I've been told that regexxing the user agent string is not the way to go. Other than detecting screen width (which would NOT work properly in the case of the android tablet - resolution is usually 1280x800), I'm not sure what else to do.

Desktop Targets (Win Vista, Win7, OSX):
- IE 7-9
- Chrome
- Firefox 3+
- Safari

Smartphone Targets:
- Android 2.2 (stock browser)
- iPhone 3GS, 4, 4S (safari)

Tablet Targets:
- Android 3 (stock browser)
- iPad1, iPad2 (safari)

Reply With Quote
  #2  
Old January 11th, 2012, 06:16 PM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2001
Location: Bonita Springs, FL
Posts: 5,568 kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)kicken User rank is General 35th Grade (Above 100000 Reputation Level)  Folding Points: 1930891 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1930891 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1930891 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1930891 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1930891 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1930891 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1930891 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1930891 Folding Title: Super Ultimate Folder - Level 4Folding Points: 1930891 Folding Title: Super Ultimate Folder - Level 4
Time spent in forums: 2 Months 2 Weeks 1 Day 10 m 27 sec
Reputation Power: 3292
You have limited options for detecting browsers. Build both versions and provide a manual toggle switch that lets the user choose which one they prefer.

You can keep the auto-detect you currently have so most users will probably end up on the correct page, but leave two small links that the bottom of the page that will override the choice, say:

Quote:
View the Full or Mobile experience.


If they choose full, let the flash load (provided it is available, optionally show a message if not). If they choose mobile, disable the flash regardless of if they are on a desktop of not.
__________________
Recycle your old CD's, don't just trash them


Spidermonkey Tutorial;

If I helped out out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud

Reply With Quote
  #3  
Old February 1st, 2012, 02:18 AM
john hipster john hipster is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 10 john hipster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 5 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
You can target your web page for different screens using viewport metadata, CSS.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > One webpage - targeting multiple devices and browsers...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap