Acquisition front-end server time

Detailed look at the bloggers

https://segmentfault.com/a/1190000012878173

There is a need to get the time function, originally acquired the client time, but the client may encounter a malicious user to change the time during development, so I plan to get the server time.

Principle: When using ajax request, return the header information contains the time information of the server, acquires the time data in the header information in the return information to

 

Guess you like

Origin www.cnblogs.com/nongfusanquan/p/12408156.html