Reputation: 91
I am new to html. Is it possible to have Short URL for apps? for example:- instead of long url "www.abc.com\x\y\z\a" can we have "www.abc.com\r" in the user 's address bar. can we emulate this using javascript?
Upvotes: 4
Views: 417
Reputation: 20158
Yes, you could by creating a document at location /r
and adding a Javascript to that document which simply does:
document.location.href = "/x/y/z/a";
But, for many reasons you shouldn't.
You really should try to handle this at the server side of you application.
Upvotes: 1
Reputation: 37566
This is done using Database which gets the long URL to the Short one, so its noting you can do on Clientside only using Javascript.
Upvotes: 0