0

I am working on a free domain service provider and it appends its own brand name to my URL on the browser address bar. I want to prevent that by re-writing the URL to give the user a better look and feel. How do I do that using only Javascript (no add-on libraries)?

1

1 Answer 1

1
window.history.pushState(null,'title','/something');

First argument is data, you don't need that.

Second one is the new page title.

Third one is the url. However you cannot completely change it, it will still be relative to the domain.

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

1 Comment

thank you. i was just wondering if there is any de limiter in javascript. like \n is for new line so is there for 'backspace'

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.