How to get the url from link rel="next" in <head> with javascript
javascript
Solution
IE8+
document.querySelector('link[rel="prev"]').href;
Problem
How to get the url from ``` <link rel="prev" title="Selected 3" href="http://mydomain.com/2.html" /> ``` in the head using pure javascript? In jquery I have a working solution: ``` var prevUrl = $('link[rel=prev]').attr("href"); ``` I can't change the output of the "link rel" or add an Id, as it is generated by a CMS. Any help is greatly appreciated, thanks.