2

There is a page needs query string to trigger a function:

http://www.example.com/index.html?triggerfunc

After the function is performed, is it possible to remove the query string (make the url like the following one) without refreshing the page?

http://www.example.com/index.html

2
  • Do you require query string. Even values can be posted via POST method while submitting the form. In this case the URL will not change. Commented Mar 13, 2012 at 8:48
  • Yes, query string is required. The query string was brought to the current page by clicking anchor elements in another page. Commented Mar 13, 2012 at 14:36

2 Answers 2

3

No,the url is controlled by browser,the browser have to reload when you changed the url.

Sign up to request clarification or add additional context in comments.

Comments

0

Yes @Vito Van is right. The browser controls the URL. You can resubmit the code twice to remove the query string while retaining the final response.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.