Redirect from mobile site to full site

Michael Schofield mschofield at NOVA.EDU
Thu Jan 3 11:35:47 EST 2013


Hey Kevin,

If you’re using jQuery elsewhere, then the jQuery Cookie plugin [or any additional jQuery] won’t really be any extra burden to performance and yes, your javascripting life will be made so much easier. jQuery is the most widely used JS library ever – and because it’s being used on about half of all websites, the benefit is that any of your users probably has the library cached by their browser. It is definitely worth learning. NetTuts wiz Jeffrey Way has a free “Learn jQuery in 30 Days” course. Very quick screencasts. Excellent presentation. There are a lot of tutorials out there, but they are not created equal. There is a difference writing

$(‘.button’).click();

and

$(‘.button’).on(‘click’, function(){});

and Jeffrey Way explains which is preferable [and why].

http://learnjquery.tutsplus.com/

Super resource!

All the best,

Michael | ns4lib.com

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

Thank you Michael for your quick response.

Our future goal is a mobile-first, responsive site so it won't require the use of that third-party (mobile) site.

As far as the carousel is concerned, I'm not sure if that is going to make it or not in the future site, but we will certainly look into those tools if it does.

I am not that familiar with jquery, but I want to be at some point. The person who built this site did use jquery for menus, so maybe that will get us there? I will take a look at what you linked to see if that gets us there. Thanks!


Michael Schofield via<http://support.google.com/mail/bin/answer.py?hl=en&ctx=mail&answer=1311182> listserv.nd.edu


11:15 AM (3 minutes ago)
[https://mail.google.com/mail/u/0/images/cleardot.gif]

[https://mail.google.com/mail/u/0/images/cleardot.gif]
[https://mail.google.com/mail/u/0/images/cleardot.gif]

to WEB4LIB
[https://mail.google.com/mail/u/0/images/cleardot.gif]


[https://mail.google.com/mail/u/0/images/cleardot.gif]

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<http://detector.dmolsen.com/> )—a PHP Library and Modernizr (http://www.modernizr.com<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]***<https://github.com/carhartl/jquery-cookie%5D***>) 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<http://nova.edu/>) | Web Services Librarian | (954) 262-4536<tel:%28954%29%20262-4536> | www.ns4lib.com<http://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<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<mailto:WEB4LIB at LISTSERV.ND.EDU>
Subject: [WEB4LIB] Redirect from mobile site to full site
[https://mail.google.com/mail/u/0/images/cleardot.gif]

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/>



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


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/94ca4bee/attachment.htm>


More information about the Web4lib mailing list