The computer displays the QR code and initiates an ajax request at the same time. The server suspends the request. After the mobile phone scans the code, it will also send a request to the server with parameters that can determine the user. The server will respond after receiving the request. The request that was just pending
It should be that after receiving the scan, the URL corresponding to the QR code will send a notification to the mobile phone where the QR code is located. So this QR code should have a unique parameter corresponding to the only mobile phone that is displaying it.
The specific implementation is the problem that occurs once a day.
Ajax polling, websocket, etc. are all available
You can find a lot of solutions by searching on this site.
I opened your webpage in the office.
The computer displays the QR code and initiates an ajax request at the same time. The server suspends the request.
After the mobile phone scans the code, it will also send a request to the server with parameters that can determine the user. The server will respond after receiving the request. The request that was just pending
It should be that after receiving the scan, the URL corresponding to the QR code will send a notification to the mobile phone where the QR code is located.
So this QR code should have a unique parameter corresponding to the only mobile phone that is displaying it.
The specific implementation is the problem that occurs once a day.
Ajax polling, websocket, etc. are all available
You can find a lot of solutions by searching on this site.