After opening a webpage in WeChat, you can select "Open in browser" in the upper right corner to open the webpage in an external browser. Is there any way to open it and determine whether this URL is brought from WeChat?
Note: I don’t want to judge whether to open this web page in WeChat. This can be done simply by using UA. I want to judge in the open external browser that the last visit was in WeChat, and I can’t judge based on the address. from parameter, because others can forge it
After opening a webpage in WeChat, you can select "Open in browser" in the upper right corner to open the webpage in an external browser. Is there any way to open it and determine whether this URL is brought from WeChat?
Note: I don’t want to judge whether to open this web page in WeChat. This can be done simply by using UA. I want to judge in the open external browser that the last visit was in WeChat, and I can’t judge based on the address. from parameter, because others can forge it
The original webpage URL has WeChat parameters added at the WeChat entrance. Then you can judge whether it is in WeChat by just checking whether there are parameters. Of course, if your link is in Moments and the chat is clicked, WeChat will also add relevant parameters by default, like this from=timeline, from=groupmessage from=singlemessage.
Another method is to use the UA of WeChat’s built-in browser to determine whether the webpage is opened in WeChat
Determine whether WeChat is opened: