abhijeetnishal / URLShortener

URL Shortener Deployed Link 👇🏻
https://urlsrtner.vercel.app
MIT License
37 stars 61 forks source link

[Feature] Keep history of shortened urls using cookies #106

Closed kauxp closed 1 month ago

kauxp commented 1 month ago

Description

When a user uses this service to shorten a URL we can store the shortened URL along with the original in browser cookies so that the user does not have to ping to shorten the same URL repeatedly.

Changes

When the shortened URL is returned, I will save the original and shortened URL as a key-value pair in browser cookies.

Alternatives

We can create an authentication system where we can track all the URLs shortened by the user, this will allow us to track all URLs shortened by the user, and we can also track the number of hits on that URL. This will enable us to do anything we want.

Contributor

Paramjeet Kaur Matharu I can work on this issue and implement it.

github-actions[bot] commented 1 month ago

Congratulations, @kauxp! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work!

We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines

abhijeetnishal commented 1 month ago

Hey @kauxp, there are many disadvantages of keeping history in cookies like:

  1. Cookies have size limitations, which can restrict the number of URLs that can be stored.
  2. Cookies can be vulnerable to attacks, which could compromise user data.
  3. Cookies may not work consistently across different browsers, devices, or platforms.

Because of these issues, we can't implement this using cookies we can use server side storage for logged in users to see there shortened URL's, for that there is an issue #98

contribute to other issues or projects, good luck.

Aditya2ReaLNITKKR commented 1 month ago

@kauxp i want to work on this issue under ggsoc' 24