Why you can’t “copy the link”
-
It’s probably not a link at all
• Anything that shows the little hand cursor (cursor: pointer) can look link-ish, but HTML offers two very different building blocks:
| Element | Typical purpose | Has an href you can copy? |
|---|
<a> (anchor) | Navigation | Yes |
<button> / <div> etc. | Run JavaScript, submit a form, open a modal, call an API … | No |
If the site author styled a <button>/<div> to look clickable, right-click → “Copy link” simply isn’t available because there is no href attribute to copy.
-
The click might trigger JavaScript instead of a plain redirect
• Ajax calls, fetch(), form submissions with hidden CSRF tokens, etc.
• The final URL may be calculated on the fly or the request may be a POST.
• Result: you can’t just bookmark it or e-mail it as a stand-alone link.
-
The site may deliberately suppress the right-click menu (not recommended, but common). Even if it were an <a> element, JavaScript like
element.addEventListener('contextmenu', e => e.preventDefault());
blocks “Copy link address”.
Can you create a URL that reproduces the same action?
“Maybe.” It depends on what the click is actually doing.
| Scenario | How to reverse-engineer | Can it be turned into a plain link? |
|---|
Simple redirect (window.location = "…/target-page" or <a href> hidden inside) | Use DevTools → Elements panel → look for an href, or Network panel to see the 302/GET request. | Yes – grab that URL and you’re done. |
| Regular HTML form (method="GET") | Inspect the <form> tag for action="" and input names. | Build your own URL: action?name=value&… |
| HTML form (method="POST") or Ajax call (fetch/XHR) | DevTools → Network tab → watch what request fires when you click. Note request method, URL, and payload. | Not as a clickable browser link. Needs a POST request (curl, Postman, your own HTML form, or JS fetch). |
| Dynamic URL that contains nonces / CSRF tokens / timestamps | Same as above, but tokens expire. | Only if you regenerate/resend the fresh token every time. |
| Purely client-side action (opens a modal, toggles CSS) | No network traffic. | There is no backend endpoint – nothing to link to. |
How to find out what the button actually does
- Open the page in Chrome/Edge/Firefox.
- Press F12 (DevTools).
- Go to Elements → hover the button in the page, then do Inspect Element.
• Is it <a href="…">? Copy that href.
• Is it <button>/<div>? Look for onclick="..." or data attributes.
- Switch to the Network tab, tick “Preserve log”, clear it, then click the button.
• If one or more requests appear, right-click → “Copy → Copy as cURL”.
• Check if the request is GET or POST and whether query strings or bodies contain tokens.
If you must create a sharable link
• If the click ends in a normal GET redirect, that URL is already shareable.
• If it needs a POST/payload, you can:
<!-- Make a small HTML file that auto-submits a POST form -->
<form id="relay" method="POST" action="https://example.com/doAction">
<input type="hidden" name="token" value="ABC123">
<input type="hidden" name="id" value="42">
</form>
<script>document.getElementById('relay').submit();</script>
Anyone who opens that file in a browser will perform the same POST, but keep in mind:
• Tokens may expire.
• You might violate terms of service or security policies.
• Being able to reproduce an action does not mean you’re allowed to.
TL;DR
The “hand” cursor only tells you it’s clickable, not that it’s an honest-to-goodness link. In many modern web apps the click is wired to JavaScript, forms, or API calls that can’t be expressed as one simple URL. Open DevTools, watch the Network panel, and you’ll know whether you can copy an href, need to replicate a POST, or if the action lives purely on the client side and therefore has no URL at all.
Let me know what you discover in DevTools and I can help you craft the exact request if one exists!