How to solve ?m=1 issue
Blogger is a popular blogging platform that allows users to create and publish their blogs online. However, some users may encounter an issue where the URL of their blog includes
"?m=1" when accessing it on a desktop or Mobile device. This can cause problems with the formatting and functionality of the blog, as the mobile version is optimized for smaller screens and touch-based navigation. In this blog post, we will discuss how to solve the "?m=1" issue from the Blogger URL.
<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>
5. Now paste the copied code above the </body> Tag ,at the bottom of your html file as show below
6. After pasting code sucessfully save the file refresh your website .
Your blog's URL should no longer include "?m=1" when accessed on desktop and laptop devices.It's always a good idea to preview your blog on different devices after making changes to ensure that it appears correctly. With these steps, you can enjoy a hassle-free blogging experience on Blogger.
0 Comments