Webvanta's mobile detection features provides a means for you to allow users to override the default behavior and force viewing of the full site while on a smartphone.
One easy way to allow users to do that is to provide an anchor tag that has a click handler on it:
<a href="/" class="view-full-site">Full Site</a>
This creates a link on the mobile site, that when clicked will invoke the following click handler, which you include in your mobile site's JavaScript:
<script>
$("#mobile-page-<w:slug />").live('pageshow', function(psevt) {
$('.view-full-site').click(function(event){
event.preventDefault();
$.cookie('wv_mobile_mode','full', {expires:1, path:'/'});
document.body.style.display = "none";
window.history.pushState("Going to Desktop Site", "Site Name Here", "/");
location.reload();
});
});
</script>
Note: updated 4/24/13; the script we previously published stopped working with the aggressive caching being done by recent phone browsers.
3 Comments