Redirect from mobile site to full site

Michael Schofield mschofield at NOVA.EDU
Thu Jan 3 11:15:59 EST 2013


Hi Kevin,

If you were thinking about consolidating the mobile and the full website [you know, so you don’t have to maintain two separate websites], then look into adaptive, mobile-first design*. IMHO, that’s really the long-term solution. You can use tools like Dave Molsen’s Detector ( http://detector.dmolsen.com )—a PHP Library and Modernizr (http://www.modernizr.com), essentially—to help serve [or not serve**] specific content to different devices. If you’re going to Wordpress (or, ahem, Drupal) then it isn’t hard to integrate Detector since both are PHP. If you’re not worried about loading special content for different devices, Detector itself might be overkill and you can just use CSS and Modernizr.

If you’re happy relying on javascript, for a quick fix I would just set a session cookie the first time the page redirects (I use this jQuery Cookie plugin [https://github.com/carhartl/jquery-cookie]***) and then if the user clicks back over to the full site, if the cookie is present then stop the redirection.

I kind of really really really like talking about this stuff, so feel free to hit me up off list.


Michael Schofield(@nova.edu) | Web Services Librarian | (954) 262-4536 | www.ns4lib.com
Alvin Sherman Library, Research, and Information Technology Center

Hi! Hit me up any time, but I’d really appreciate it if you report broken links, bugs, your meeting minutes, or request an awesome web app over on the Library Web Services<http://staff.library.nova.edu/pm> site.



* Here’s the slide deck of a talk I give called “Future Friendly Web Design for Libraries.” http://ns4lib.com/talks/future-friendly
** You probably don’t want a carousel / slideshow for a mobile display.
*** But I use a lot of jQuery. If you’re not using jQuery anywhere else, it’s probably not worth loading the entire library just for the cookie. You can set the cookie with vanilla cookie, but um, it’s way less work with jQuery.



From: Web technologies in libraries [mailto:WEB4LIB at LISTSERV.ND.EDU] On Behalf Of Kevin Brahm
Sent: Thursday, January 03, 2013 10:39 AM
To: WEB4LIB at LISTSERV.ND.EDU
Subject: [WEB4LIB] Redirect from mobile site to full site

Our library system has a separate mobile site that uses a third party called wirenode.com<http://wirenode.com/>. We push mobile users to this site using the following javascript code block

<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "http://pascolibraries.wirenode.mobi<http://pascolibraries.wirenode.mobi/>";
}
//-->
</script>

I haven't updated the mobile site much since I first took a crack at it when I came to this department at the end of 2011. At the time I noticed that mobile users never had a chance to visit our full site because they would be re-routed each time back to the mobile site. None of us could figure out what code we would use or change to break the cycle, so our workaround at the time was to serve up an alternate version of our index on our mobile site that didn't include the above code. Can anyone help lead us in the right direction? We are in the early stages of learning Drupal and may be heading in that direction (or Wordpress) - but we would like to fix this and get away from our original workaround. Thanks!

Thanks!


Kevin Brahm
Virtual Services Librarian
Pasco County Library System
kevinb at pascolibraries.org<mailto:kevinb at pascolibraries.org>
www.pascolibraries.org<http://www.pascolibraries.org>

[PCFl Seal]

The information transmitted, including attachments, is intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and destroy any copies of this information. Under Florida law, email addresses are public records. If you do not want your email address released in response to a public-records request, do not send electronic mail to this entity. Instead, contact this office by phone or in writing.
============================

To unsubscribe: http://bit.ly/web4lib

Web4Lib Web Site: http://web4lib.org/

2013-01-03

============================

To unsubscribe: http://bit.ly/web4lib

Web4Lib Web Site: http://web4lib.org/

2013-01-03
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.nd.edu/pipermail/web4lib/attachments/20130103/0f8b970b/attachment.htm>


More information about the Web4lib mailing list