Confluence "switch back to mobile" links does not appear when used in desktop mode


アトラシアン コミュニティをご利用ください。


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

This article is about Confluence mobile web. It does not apply to the Confluence iOS app, which is available now for Confluence Cloud customers.


After switching to desktop mode in the mobile phone browser, the link "switch back to mobile" mode does not appear at the top menu. Therefore the user is not able to switch back to the mobile mode in their browser.


The workaround is to manually add the link to switch back to mobile mode in your Confluence

  1. Go to Confluence Administrator >> Custom HTLM >> EDIT
  2. Add the following script in the header then save


     <script type="text/javascript">
       AJS.toInit(function() {
        Confluence.MobileSwitch = {
            switchToMobile: function(e) {
                AJS.$.cookie("", null, Confluence.MobileSwitch._cookieOptions); // this cookie name matches desktop-switch.js
                // remove the desktop=true request parameter if it is present
                if (window.location.href.match(/[?&;]desktop=true/)) {
                    var href = window.location.href.replace(/desktop=true&?/,"")
                    window.location = href;
                } else {
            initialise: function() {
                $messageContainer = AJS.$("#messageContainer");
                // If the element does not exist, it will be created.
                !$messageContainer.length && ($messageContainer = AJS.$("<ul id='messageContainer' />").appendTo("#header-precursor .cell"));
                Confluence.MobileSwitch._cookieOptions = {
                    expires: 3650,
                    path: AJS.Meta.get("context-path") || "/",
                    raw: true

最終更新日: 2016 年 2 月 26 日


Powered by Confluence and Scroll Viewport.