How to remove ?m=1 in blogger

The purpose of removing the Blogger ?m=1 URL is to reduce the duplication factor of detected content.
How to remove ?m=1 in blogger

URL ?m=1 in CSS terms is called Media Only and Screen which indicates that the URL is being accessed using a mobile device. The purpose of removing the Blogger ?m=1 URL is to reduce the duplication factor of detected content.

In short, if you want to remove the URL ?m=1, you can use one of the following methods:

Through the Layout Menu

  • Go to the Layout menu
  • Then add a widget/gadget and select HTML/Javascript
  • Copy the following code:
    <script type=&
    var uri = window.location.toString();
    if (uri.indexOf("&m=1","&m=1") > 0) {
      var clean_uri = uri.substring(0, uri.indexOf("&m=1"));
        window.history.replaceState({}, document.title, clean_uri);
    }
    var uri = window.location.toString();
    if (uri.indexOf("?m=1","?m=1") > 0) {
      var clean_uri = uri.substring(0, uri.indexOf("?m=1"));
        window.history.replaceState({}, document.title, clean_uri);
    }
    </script>
  • Enter the following code into the widget/gadget
  • then press the Save button
  • Done

Through the Theme Menu

  • Go to the Themes menu.
  • Then press the Edit HTML button.
  • Look for the </head> code and copy the following code right above it:
    &lt;script type=&
    var uri = window.location.toString();
    if (uri.indexOf(&quot;&amp;m=1&quot;,&quot;&amp;m=1&quot;) &gt; 0) {
      var clean_uri = uri.substring(0, uri.indexOf(&quot;&amp;m=1&quot;));
        window.history.replaceState({}, document.title, clean_uri);
    }
    var uri = window.location.toString();
    if (uri.indexOf(&quot;?m=1&quot;,&quot;?m=1&quot;) &gt; 0) {
      var clean_uri = uri.substring(0, uri.indexOf(&quot;?m=1&quot;));
        window.history.replaceState({}, document.title, clean_uri);
    }
    &lt;/script&gt;
  • Then press the Save button
  • Done

Remember, just use one (1) method above. Until now, you have successfully removed the URL ?m=1 on your blog when using a mobile device.

So the tutorial on how to remove ?m=1 in bloggerIf there is a part that you don't understand, please leave a comment.

Post a Comment

© TelecomYaar. All rights reserved. Developed by Jago Desain