Delete items from frontend with ajax
That looks perfect!

Obviously this code doesn't prompt the user to confirm deletion, but that can easily be added. (Or perhaps you stripped that out of your example.)

You are specifically doing two things right here:


Hitting deleteEntry directly. This ensures that Craft follows all of its necessary internal procedures to properly delete the entry (and kill any relationships it may have).
Including the CSRF token information. Not sure if it's currently required for hitting a native Craft method, but it certainly will be when Craft 3 rolls out. Good future-proofing!


Looks great Johannes, go for it!