Ask HN: Why clicking on favorite takes you to favorites page?
1–7 of 7 posts
Re: Ask HN: Why clicking on favorite takes you to favorites page?
#2Re: Ask HN: Why clicking on favorite takes you to favorites page?
#3It's because HN uses very little Javascript. So this is the way it works, a simple get request to an endpoint.
Re: Ask HN: Why clicking on favorite takes you to favorites page?
#4It's because HN uses very little Javascript. So this is the way it works, a simple get request to an endpoint.
I'm not on a computer to test this, but I wonder if it would be possible with the href attribute set to a fragment (#) and the ping attribute set to the URL where a favorite gets saved. I'm not sure if ping works without navigating to another page or not
When in doubt I suggest simply emailing our moderator, TheDang: hn@ycombinator.com. They are the ultimate arbiter of these matters.
Re: Ask HN: Why clicking on favorite takes you to favorites page?
#5It's because HN uses very little Javascript. So this is the way it works, a simple get request to an endpoint.
I'm not on a computer to test this, but I wonder if it would be possible with the href attribute set to a fragment (#) and the ping attribute set to the URL where a favorite gets saved. I'm not sure if ping works without navigating to another page or not
Re: Ask HN: Why clicking on favorite takes you to favorites page?
#6It's because HN uses very little Javascript. So this is the way it works, a simple get request to an endpoint.
Re: Ask HN: Why clicking on favorite takes you to favorites page?
#7Earlier quoted context omitted.
I'm not on a computer to test this, but I wonder if it would be possible with the href attribute set to a fragment (#) and the ping attribute set to the URL where a favorite gets saved. I'm not sure if ping works without navigating to another page or not
I don't think the #-and-after portion gets submitted to the server. IIRC it's reserved exclusively for client-side use. When in doubt I suggest simply emailing our moderator, TheDang: hn@ycombinator.com. They are the ultimate arbiter of these matters.