You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a user who can make mistakes (as all users do), we want the shortlinker to be smart about it and warn the user when they're trying to create a shortlink that won't work for one of these obvious reasons:
When the URL returns a status code of 302. In such cases, the shortlinker should follow through (perhaps there are multiple redirects) until it reaches a page that returns a 200 status code. That's the URL that needs to be saved to the database. However, if the URL contains strings like account or signin, this signifies that the user has tried to save a shortlink for a web page that cannot be shared. In such instances, we should display a warning.
Potential other checks
Maybe there are other sanity checks we could consider. ChatGPT suggested the following:
Potential Security risks: Check for URLs leading to websites known for phishing or malware distribution, perhaps by comparing the URL against a regularly updated threat database.
Repeated Shortening: If a user is attempting to shorten a URL that has been shortened already, the service might just retrieve the previously created shortlink rather than creating a new one.
The text was updated successfully, but these errors were encountered:
As a user who can make mistakes (as all users do), we want the shortlinker to be smart about it and warn the user when they're trying to create a shortlink that won't work for one of these obvious reasons:
404
(such as https://evelinewaays.be/).302
. In such cases, the shortlinker should follow through (perhaps there are multiple redirects) until it reaches a page that returns a200
status code. That's the URL that needs to be saved to the database. However, if the URL contains strings likeaccount
orsignin
, this signifies that the user has tried to save a shortlink for a web page that cannot be shared. In such instances, we should display a warning.Potential other checks
Maybe there are other sanity checks we could consider. ChatGPT suggested the following:
The text was updated successfully, but these errors were encountered: