New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easier-to-use URLs #63
Comments
This is partly a duplicate of #46, but I'll leave it open because you've also provided some other valuable feedback. You can already use The idea for a shorter name and domain has been discussed a few times before, but I haven't come up with anything that is:
|
That's helpful to know. Would it be possible to keep the |
Would it also be possible to pass a query parameter attempt-this-online/frontend/lib/urls.ts Lines 7 to 27 in c20bd16
The specific use case for us is generating a link next to any markdown code block. It opens up a code playground like ato using the language chosen for highlighting. |
I think it would make more sense to add an API endpoint for link generation. |
Yeah. Maybe an endpoint that returns an HTTP 302 response? |
I meant, create an endpoint where you can pass the data:
as parameters, and it will return the URL in the response. |
Ah, I see. Maybe a GET endpoint that takes these data as query parameters, and redirects in response? Redirection would be prefer because then this alternative URL can be used in place of the compacted one (like an alias), and it saves the implementation overhead of needing a roundtrip to fetch the URL and store the response. The URL would still be available to applications if they choose to not follow it. |
The thing is, if the server logs requests (maybe it doesn't?), then the code is going to be in the log files if it's a GET request. (And also uncompressed, making the log files longer.) It should be a POST request and avoid the convenience of alternative URLs. |
In the end, it's all up to @pxeger, of course. |
TIO has a nice URL scheme for each language, so if I want to use PHP, I can go to https://tio.run/#php
I would really like a way to easily pick which language I'm on with a quick type in the address bar. All I had to type was
tio.run#php
. This way, I could also easily bookmark a language, or see in my browser history which language I was using for each program.As it is right now, if I select PHP on ATO, I get sent to https://ato.pxeger.com/run?1=m724IKNgwYKlpSVpuhZoFJQGAA, and this doesn't tell me anything about the language I'm on, nor is it something I can remember in order to type it in my address bar. I'd like to see something like: https://ato.pxeger.com/#php?1=m724IKNgwYKlpSVpuhZoFJQGAA
I'd also like a shorter or simpler URL in general than ato.pxeger.com, as that's hard to remember, but that's more of a nitpick.
The text was updated successfully, but these errors were encountered: