I want to get metadata (title, description etc) of a website to show link preview in my chat application.
My plan is to get the webpage of the website using link (by XHR request from my app) and parse it to get metadata. (I want to do everything in browser without needing to contact server for the purposes of link preview)
But in most of the case I get CORS.
My question is:
How do I get around CORS to get a website's main page? If its not possible, how do other chat application implement link preview? Do they all require a server for that?