How to remove code? m = 1 and? m = 0 on a mobile device for blogger

How to remove code? m = 1 and? m = 0 on a mobile device
How to remove code? m = 1 and? m = 0 on a mobile device


You're looking to use a responsive template instead of Blogger's default device mode. However, when using desktop mode for mobile devices, Blogger will manually add a query ?m=1 and ?m=0 after each url. This will probably affect the blog's SEO. In this article, I will guide you to delete ?m=1 and ?m=0 when accessing on mobile devices for Blogger.

Actually, the code? M = 1 means the device used is a mobile device, and the code? M = 0 means that the device used is a desktop device, even if the code is not actually found? M = 0 on desktop devices.

Of course, this will become a duplicate title tag, because there are other parameters, which of course will also affect the position of the SEO blog on the SEO engine. So, there are several ways to get rid of the code code? M = 1 or? M = 0 About the appearance of mobile devices

How to remove code? m = 1 and? m = 0 on a mobile device

  • Step 1: Log in to your Blogger Account
  • Step 2: Open Theme Menu Then Click Edit html
  • Step 3: Add This Code in Above </body>
<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>

Conclusion

Here is all you have to do. By adding a simple script, your blog will now no longer display the ?m=1 and ?m=0 parameters in the address bar when accessed by mobile devices. See more great tips when using Blogger here.

Đánh giá của bạn về bài viết này:

Thành Trương Blog

Bắt đầu mỗi ngày với một suy nghĩ tích cực và một trái tim biết ơn

Đăng nhận xét

Mới hơn Cũ hơn

Comments

×Close