5 ms·
URL parameters starting with # sound interesting, since they are obviously not sent to the server.
by chkas 4y ago
URL parameters starting with # sound interesting, since they are obviously not sent to the server.
- chkas 4y agoI looked it up: "#" is the location.hash and sets the anchor part of a URL. And is probably perfect for client side parameters, which is what I need. Such a discussion on HN is really often very helpful. There was a comment here that unfortunately got deleted again before I could reply that mentioned that.
- cryptonector 4y agoIt's called a "fragment", and it's never sent to the server in HTTP requests. It was originally intended to have an HTML anchor as its value. Like when you click on a section or paragraph and you see the URL in the location bar gets "#<anchor>".
- chkas 4y agoIt now also works with "#" parameter code - which is not sent to the server unnecessarily. https://easylang.online/run/#code=%23%20Pendulum%0A%23%20%0Aang%20%3D%2045%0Acolor%20881%0A%23%20%0Aon%20animate%0A%20%20clear%0A%20%20move%2050%2050%0A%20%20circle%201%0A%20%20x%20%3D%2050%20%2B%2040%20*%20sin%20ang%0A%20%20y%20%3D%2050%20-%2040%20*%20cos%20ang%0A%20%20line%20x%20y%0A%20%20circle%206%0A%20%20vel%20%2B%3D%20sin%20ang%20%2F%207%0A%20%20ang%20%2B%3D%20vel%0A.%0A https://easylang.online/run/#code=%23%20Pendulum%0A%23%20%0A...