Login Member
close
Subscribe
Home Addson
Anti ?m=1 Url Parameter Blogger

Anti ?m=1 Url Parameter Blogger

"A simple JavaScript snippet to remove the ?m=1 parameter from URLs, often added by Google Blogger for mobile views device. "

anti m1 blogger

Details

The ?m=1 parameter is an automatic query string appended by Google Blogger to signify that the page is being viewed on a mobile device. While this parameter serves a purpose for Blogger's internal functionality, many users dislike its presence in the URL as it can make links look cluttered or less professional. To address this, a simple JavaScript snippet can be used to detect and remove the ?m=1 parameter dynamically. This ensures that the URL remains clean and free of unnecessary query strings, enhancing both aesthetics and usability.


Code

JavaScript

var uri = window.location.toString();
if (uri.indexOf("?m=1") > 0) {
    var clean_uri = uri.substring(0, uri.indexOf("?m=1"));
    window.history.replaceState({}, document.title, clean_uri);
}


Help Me Install
Comments
Form Checkout
Add Voucher %
By purchasing, you agree to all terms.
Konfirmasi Pembayaran