Create link previews on the client side, like in Facebook/LinkedIn

后端 未结 3 1930
遇见更好的自我
遇见更好的自我 2020-12-23 14:49

I am creating a web app with an input box where the user can write anything, including URLs. I want to create a link preview like Facebook and LinkedIn does:

3条回答
  •  自闭症患者
    2020-12-23 15:46

    Yes, you can generate link previews completely on the client, which is how link previews should be generated anyway, for efficiency and to avoid DOS-ing your server.

    To find a client-side library that does link previews, search GitHub for "link preview", and narrow down the search to JavaScript.

提交回复
热议问题