- This topic is empty.
-
AuthorPosts
-
April 6, 2011 at 2:56 pm #32255
mumptastic
ParticipantOk, I have a redirect on my site to send iPhone and Android users to a mobile site. Now, how do I get from the iPhone site to the Desktop version and avoid the redirect?
April 6, 2011 at 3:59 pm #51989TT_Mark
MemberUse css media queries to serve them the same content as a desktop but in a more mobile friendly way?
April 6, 2011 at 4:25 pm #51990Historical Forums User
ParticipantHey mumptastic – I had this same problem a while ago. I posted my problem – and never really got a great answer. I was using htaccess to redirect mobile devices at the time. I know that many big corporations use server side technology to serve up totally different versions of their site (mostly for performance), but for small projects css media queries and javascript may be your answer. I’ll explain…
At first I figured I could just use media queries to style content for the mobile device, and then use a javascript stylesheet switcher to style as if the site were a desktop one. This didn’t really work that well though. I’ve been using a css/javascript technique recently that is very close to what this guy has talked about;
http://omaritech.blogspot.com/2011/02/code-using-javascript-and-css-to-switch.html
Let me know if this helps!
April 6, 2011 at 4:33 pm #51991Historical Forums User
Participantnot really a great solution TTMark, but beautiful site. Thanks for sharing!
April 6, 2011 at 4:44 pm #51992TT_Mark
MemberIt was mainly to show that you don’t need to redirect users to a ‘mobile’ site when it’s perfectly possible to use CSS Media Queries to achieve a mobile stylesheet.
Responsive web design is the current buzzword/phrase in the industry
April 6, 2011 at 4:58 pm #51994DogsGhost
Memberwhat’s wrong with media queries? Its a lightweight solution and tailors the content layout to the user’s preferred device.
April 6, 2011 at 5:09 pm #51997mumptastic
ParticipantI understand using media queries is the way to go, but my client already has a mobile site built… this is why I was asking for help.
April 6, 2011 at 5:15 pm #52000DogsGhost
MemberHow are you doing the redirect from desktop site to mobile?
April 6, 2011 at 5:21 pm #51976mumptastic
Participantif(strstr($_SERVER,'iPhone') || strstr($_SERVER,'iPod'))
{
header('Location: http://yoursite.com/iphone');
exit();
}
?>April 6, 2011 at 7:18 pm #51959Historical Forums User
ParticipantGuys, don’t get me wrong – I’m absolutely in love with media queries, but – how do you plan on giving users a way to navigate back to the desktop version if they want to? Also, performance is a concern with the current specs of mobile devices. With media queries, they kick in after DOM load, and there isn’t an easy way to stop them from loading full img and object assets (whether or not you’re displaying them via your stylesheet). These two things aren’t really accomplish-able with media queries alone. So, no, media queries aren’t a silver bullet – but they’re mighty fine indeed.
April 6, 2011 at 7:34 pm #51940mikelegacy
MemberMost sites I go to on my mobile phone, If I just add /index.html, or whatever the index page is named, to the end of the URL, it directs me to the desktop site. For example, try loading penguins.nhl.com onto your mobile device, then type that and /index.html on the end, it will direct you to the NON mobile site. Just adding a link a the bottom of your page that says “Non Mobile Version” and directing them to that new link should fix the problem.
If I’m just being a newb, yell at me.
April 7, 2011 at 10:36 am #51848mumptastic
ParticipantFixed it, nothing a simple session couldn’t fix.
May 11, 2011 at 9:01 pm #76601Borinteen
Member@mumptastic Can you post your solution to the iPhone site to Desktop site? I’m having the same issue…
May 18, 2011 at 3:53 pm #75812 -
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.