Hide the code ?m=1 in the Mobile View on the Blogspot URL

Teuku.net - Those of you who use the blogspot platform will definitely know about the ?m=1 code at the end of the article title link if you open it via a smartphone. well, what code is that? I'll explain a little now what the meaning of the code is:

{getToc} $title={Table of Contents}

What is Code ?m=1 and Code ?m=0

Hide the code ?m=1 in the Mobile View on the Blogspot URL

Actually the code is used to distinguish the device used if ?m=1 then what is used is a mobile device, and if ?m=0 then the device used is a desktop or PC but the code ?m=0 does not appear when we access the blog from a PC , like that simple explanation.

Why do the codes ?m=1 and ?m=0 in URLs need to be removed/hidden?

Some say the code ?m=1 or ?m=0 will become duplicate title tags or duplicate content, some say it can affect SEO. but, in my opinion, the more reasonable answer is just so that our blog looks more professional, that's all, there is no other reason. Why?

{getCard} $type={post} $title={You might like}

How to remove the code ?m=1 and ?m=0 in the blog URL?

  • Open the Blogger dashboard.
  • Go to Theme, then choose and click Edit HTML.
  • Then put the following code above the code </body>

<script type='text/javascript'>
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);}

  • Finally, click Save. And see the changes.

What do you think of the URL now when accessed from a mobile device? more professional right? Thus the tutorial on how to remove the ?m=1 code on the blog URL. Hope it is useful 

Thank You.

Post a Comment

We welcome relevant and respectful comments.