How To Hide ?m=1 In Blogger

source Minning Tech

Introduction

Today In this Topic We learn How To Hide ?m=1 Sign in Blogger. We always see when we open our blog address in mobile we see ?m=1 after blog url.

And now most of the users like this sign but some others blogger couldn't accept and they try to remove this. So here we help to remove this.

Other Info

We already know that sign ?m=1 in mobile view but when we switch desktop view here we have to notice that the sign automatically vanished.

So we can view only on mobile version. We can Remove this sign with some simple steps and have to place some code to remove completely.

Steps to Hide

  1. First go to Blogger dashboard
  2. Then Go to edit HTML
  3. Search </body> Tag
  4. Copy All Codes
  5. Then paste Above it
  6. Then save the Theme
<script type='text/javascript'>

//<![CDATA[

var uri = window.location.toString();

if (uri.indexOf("%3D","%3D") > 0) {

var clean_uri = uri.substring(0, uri.indexOf("%3D"));

window.history.replaceState({}, document.title, clean_uri);

}

var uri = window.location.toString();

if (uri.indexOf("%3D%3D","%3D%3D") > 0) {

var clean_uri = uri.substring(0, uri.indexOf("%3D%3D"));

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);

}

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>

Warning :- We highly Recommend that before You can do anything, You have to backup your Theme.
•••--- The End ---•••

Hope You have successfully do all steps. Now some users thought that in this process there will effect in blog speed , So I think "No" Because I am personally use this.

Show comments
Hide comments

1 Comments

Cancel