Dot Net Stuff

How to remove query string from URL using JQuery

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.

Why remove query strings?

Main two reasons for this.

  • 1. Clear URL alwaya look better than the long URL
  • 2. When you are not remove your query string from URL. then all get variable show in you URL string. sometime it not good for a security

You can remove your query string using this simple Jquery code.



Keen to hear from you...!

If you have any questions related to what's mentioned in the article or need help with any issue, ask it, I would love to here from you. Please MakeUseOf Contact and i will be more than happy to help.

About the author

Anil Sharma is Chief Editor of He's a software professional and loves to work with Microsoft .Net. He's usually writes articles about .Net related technologies and here to shares his experiences, personal notes, Tutorials, Examples, Problems & Solutions, Code Snippets, Reference Manual and Resources with C#, Asp.Net, Linq , Ajax, MVC, Entity Framework, WCF, SQL Server, jQuery, Visual Studio and much more...!!!

Comments are closed