5 ms·
Perhaps I'm understanding this incorrectly, but what happens if you have a destructive link that deletes something?
by deevus 10y ago
Perhaps I'm understanding this incorrectly, but what happens if you have a destructive link that deletes something?
- beejamin 10y agoThe official answer is "Links shouldn't ever create or delete things". Of course, in practice, lots of links do create and delete things, and that this type of preloading would be a really bad idea on those sites.
- kayamon 10y agoSearch engines have the same problem. The solution is simply to not use HTTP GET for destructive links - use PUT or POST instead.
- Cthulhu_ 10y agoGoogle had an accellerator in their browser toolbar like 10 years ago which prefetched pages like that. It didn't end well with poorly built webapps with 'delete' links.
- dalore 10y agoYou make it a http POST as per the standard.
- evandrolg 10y agoYour you do it with POST / PUT ;) If you would like to do it using a link, you simply add data-pageAccelerator="false"