Idea for this post came from working on an SEO component for this website. I needed to add the current url to an
og:url meta tag but didn't know how to do it off-hand.
After a bit of research I discovered a few questions on Stackoverflow and Spectrum, but the answeres there were a bit hard to understand and didn't provide the full picure. So decided to write a post about it.