Closed david-a-wheeler closed 4 years ago
Rails is a popular framework and supports an optional "data-method" parameter, like this:
<a rel="nofollow" data-method="delete" href="/en/logout">
It would be very bad to automatically follow such links if data-method exists and is not GET.
Solution: Simply don't preload a links that have a data-method and provide a value other than GET (any case).
See also: https://github.com/dieulot/instantclick/issues/170
I don’t want to add code specific to Rails.
Also, if the /en/logout endpoint works only on DELETE, preloading it on GET should have no adverse effect, right?
/en/logout
Rails is a popular framework and supports an optional "data-method" parameter, like this:
It would be very bad to automatically follow such links if data-method exists and is not GET.
Solution: Simply don't preload a links that have a data-method and provide a value other than GET (any case).
See also: https://github.com/dieulot/instantclick/issues/170