re: Allun.ga - Open Source URL shortner VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Well we choose JS (specifically React) because it's easy to pick and use this webapp is computationally inexpensive, almost every client can run ...
 

Consider a user on twitter interacting with a tweet that has a link from your site. Clicking on this link will result in an HTTP 200 response for the page which will then redirect to the next link in the chain, which will hopefully also return a 200.

Where as, if this was a server side app you would not return a 200 but a 301 making it so that when the user is on site B and hits “back then they would go back to twitter and not your app and get caught in an infinite loop.

Honestly, I did not think about it. But, if I recall correctly, with React-Router you can manage the browser history.
Do you have any tip?

PS: tried it on twitter/gmail and the default behaviour is to open my link on a new tab

you are correct and it does in fact actually work, that's my bad. in that case, making this server side would only increase load time, but cool project overall :)

Glad to know it works well! And thanks for your interest

code of conduct - report abuse