jQuery remove query string parameter from url

jQuery remove query string parameter from url

A query string is the part of a URL that includes field-value pairs.

Here we are going to remove query string from URL using JavaScript.

There are number of benefits of clean URL.

Clean URL always looks better and prevent user to see if you are tracking where they came from.

It is helpful for security reasons.

Example 1 :
  1. $(document).ready(function(){
  2.     var uri = window.location.toString();
  3.     if (uri.indexOf("?") > 0) {
  4.      var clean_uri = uri.substring(0, uri.indexOf("?"));
  5.      window.history.replaceState({}, document.title, clean_uri);
  6.     }
  7. });
Example 2 :
  1. var clean_uri = location.protocol + "//" + location.host + location.pathname;
  2. window.history.replaceState({}, document.title, clean_uri);

Phone: (+91) 8800417876
Noida, 201301
kadıköy escort tuzla escort kurtköy escort kartal escort maltepe escort bakırköy escort ataşehir escort
En kaliteli ve Gerçek sex hikaye 'lerini okuyabilir ve kendi seks hikayelerinizi paylaşabilirsiniz.
Türkiyenin en iyi hd porno izle sitesi 7dak ile doyumsuz türk sikişleri seyredin.
şişli escort
pendik escort
izmir escort izmir escort izmir escort izmir escort denizli escort antalya escort antalya escort antalya escort izmir escort izmir escort izmir escort izmir escort izmir escort
ankara escort
çeşme escort
kurtköy escort escort pendik
Betwinner