Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mkopinsky
· 15y ago · 0 comments
Does it only do POSTs that are in the document's onload handler, or also things that are in onclick? I think that the latter could be dangerous
<a href="#" onclick="$.post(etc)">Delete</a>
Comments
[–]
faruken
15y ago
Why would you let an anonymous visitor to delete a data just by clicking a link?
[–]
waitwhat
15y ago
The obvious example is a wiki.
[–]
mseebach
15y ago
The implicit expected behaviour of clicking a link is that of a GET - i.e. not updating or deleting data. Delete actions should be a POST submit on a form.
[–]
waitwhat
15y ago
In theory, theory and practice are the same. In practice, they are not.