Javascript 如何在linkedin中共享包含散列的url?

Javascript 如何在linkedin中共享包含散列的url?,javascript,url,linkedin,share,hashbang,Javascript,Url,Linkedin,Share,Hashbang,我需要与linkedin共享一个url,其中包含如下https://example.com/#/item/49 我已经尝试使用#和%23代替哈希 <a href="https://www.linkedin.com/shareArticle?mini=true&url=https://example.com/#/item/49">share</a> <a href="https://www.linkedin.com/shareArticle?mini=true

我需要与linkedin共享一个url,其中包含如下
https://example.com/#/item/49

我已经尝试使用#和%23代替哈希

<a href="https://www.linkedin.com/shareArticle?mini=true&url=https://example.com/#/item/49">share</a>
<a href="https://www.linkedin.com/shareArticle?mini=true&url=https://example.com/%23/item/49">share</a>


不工作

散列被服务器忽略,但您可以使用一些缩小器(url缩短器)并为您包含它,只需搜索将重定向到带有散列的页面的缩略器。JavaScript在哪里?我认为一些缩略器甚至有API,您将能够编写代码共享url并在创建链接之前将其缩短。如果您是动态创建链接,另一种解决方案是删除哈希并使用历史API。@mplungjan我假设他有单页应用程序,如果他删除
并对路由使用历史API,他将能够拥有类似
https://squarefoot.lk/item/49
。除非url不是他的应用程序,否则他不能使用它。服务器会忽略哈希,但你可以使用一些缩略器(url缩写器),并为你包含它,只需搜索将重定向到带有散列的页面的缩略器。JavaScript在哪里?我认为一些缩略器甚至有API,您将能够编写代码共享url并在创建链接之前将其缩短。如果您是动态创建链接,另一种解决方案是删除哈希并使用历史API。@mplungjan我假设他有单页应用程序,如果他删除
并对路由使用历史API,他将能够拥有类似
https://squarefoot.lk/item/49
。除非url不是他的应用程序,否则他不能使用它。