I have noticed that the "rel" attribute is not used at all by browsers, does this make it an ideal place to store additional information for javascript (eg a delete ajax request could read the id from rel)
I have noticed that the "rel" attribute is not used at all by browsers
You noticed wrong. Browsers do make use of it (e.g. some browsers have a keyboard shortcut to go to the next page and can use the rel attribute to determine that that is). Search engines also make use of it (e.g. nofollow).
does this make it an ideal place to store additional information for javascript
No. Attributes have specified purposes. Don't assume that they aren't going to be used for that.
I'm assuming you are looking for a way to store custom data you can use in javascript. I that case:
Storing custom data can be done using data-
attributes (see here).
<a href="somelink.html" data-id="5">Link 5</a>
Alternatively/additionally you could use jQuery Metadata
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With