instantclick icon indicating copy to clipboard operation
instantclick copied to clipboard

Disable if data-method exists and is not GET

Open david-a-wheeler opened this issue 6 years ago • 0 comments

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/instantpage/instant.page/issues/47

david-a-wheeler avatar Aug 28 '19 21:08 david-a-wheeler