Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I created a responsive SharePoint site that works well for both Desktop and Mobile versions.

The problem is that SharePoint automatically redirects mobile devices to the "Mobile" URL, which is something like:


I know that it's possible to disable this in Farm solutions, but does anyone know how to do this in SharePoint Online?

If not possible, is there a workaround for this?


share|improve this question

2 Answers 2

up vote 5 down vote accepted

I finally wrote a script that appends "mobile=0" to all links relative to the site collection.

function fixMobileLinks {
    var qMobile = $().SPServices.SPGetQueryString()["mobile"];
    if (qMobile == "0") {
        var siteCollectionUrl = "http://mySiteCol";
        var jLink = 'a[href*="' + siteCollectionUrl + '"]';

        $("#s4-workspace").on("click", jLink, function () {
            var $link = $(this);                
            var href = $link.attr('href');
            href = updateQueryStringParameter(href, "mobile", "0");
            location.href = href;
            return false;           

function updateQueryStringParameter(uri, key, value) {
    var re = new RegExp("([?|&])" + key + "=.*?(&|$)", "i");
    separator = uri.indexOf('?') !== -1 ? "&" : "?";
    if (uri.match(re)) {
        return uri.replace(re, '$1' + key + "=" + value + '$2');
    else {
        return uri + separator + key + "=" + value;
share|improve this answer

The only answer I can find is:

To achieve the goal, please change “?mobile=1” to “?mobile=0” at the end the URL on mobile device. For example, to access the default homepage of a SharePoint public website without mobile version, please change “” to “”


Now if there is anyone WHO can make a script that is loaded on the page that changes the "1" to a "0", or figure out another solution, that would help a lot.


share|improve this answer
Yes, I finally had to write that script, thanks for the update. I'll post the solution here. – Amadeo Gallardo Mar 21 '13 at 12:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.