modihere / shortweb

Basic url shortener.
MIT License
15 stars 14 forks source link

Discussion on how to check if a URL is already shorted and stop it from shortening again. #30

Closed modihere closed 6 years ago

modihere commented 6 years ago

Now even if a URL is shortened the shortener again shorts it and generates a different link. But that is not of any use as the URL is already shorted by some other shortening services. Just like once bit.ly shorts a URL if the shorted URL is typed into goo.gl site it shows invalid URL or link already shortened. It would be good if we had some service like that.

mohitkh7 commented 6 years ago

Only goo.gl provide this service. All the other popular URL shortener will re-short the URL. Like I first shorten a URL using goo.gl then pasted the shorted URL on different platforms like bit.ly, ow.ly and is.gd they all shorted it again. whereas when I did the other way round, shorted a URL first on bit.ly, ow.ly and is.gd respectively and then tried shorted URL on goo.gl it gives an error message "Unable to create short URL".

So shall we include this feature in our URL Shortener ? because majority of services do not have this feature.

modihere commented 6 years ago

Okay, one more thing. If i short a url on bit.ly and again short that bit.ly url on bit.ly the site shows that the url is already shortened. If we can implement both then it will a great addition to this URL shortener as very few services provide this feature.

mohitkh7 commented 6 years ago

The two possible ways to implement this feature are -

modihere commented 6 years ago

Okay for now let go of that feature. But atleast we can add that the url once shorted by url-shortener is not again re-shortened when typed into the URLshortener. A proper error message should be displayed like "URL already shortened."

mohitkh7 commented 6 years ago

Ok. I am interested to work on this issue.