The company wants to build a mobile official website and cannot use ajax to call the interface (in order to capture data for others), so what else can be used? ? ?
What does Baidu use to capture data?
ringa_lee2017-06-30 09:59:52
It depends on what protocol the interface uses
Some interfaces can also be adjusted using php’s curl
怪我咯2017-06-30 09:59:52
You can make a WebSocket middleware and use the middleware to forward the interface. This has several benefits:
No need to repeat requests multiple times, which can speed up browser execution efficiency
The browser has a limit on the number of AJAX requests initiated simultaneously under the same domain name, while WebSocket only requires one connection, and the browser has no limit on the number of WebSocket connections
Using WebSocket, you can not only request server data. When other users operate on data on the server elsewhere, you can also push updated content to all front-end parts that are browsing this page through WebSocket broadcast, allowing data modification and browsing. Instant sync