简体   繁体   English

从Web浏览器获取JavaScript服务器时间的最快方法是什么?

[英]what is the fastest way to get server time in JavaScript from a web browser?

in fact, i wanna synchronize client-side time with server time, this solution is really good, but there are any other ideas faster? 实际上,我想将客户端时间与服务器时间同步, 此解决方案确实不错,但是还有其他更快的想法吗? in other words, can we find a faster way to get server time in JavaScript from a web browser? 换句话说,我们能否找到一种更快的方法来从Web浏览器中获取JavaScript中的服务器时间?

Sway - the link you mentioned is the better way to go, i dont think you can anyway sync with server clock without knowing what is the time on the server. Sway-您提到的链接是更好的方法,我认为无论如何您都无法与服务器时钟同步,而无需知道服务器上的时间。

in the below example he has given a good pictorial representation too. 在下面的示例中,他也给出了很好的图形表示。

http://codemadesimple.wordpress.com/2012/06/18/timesync-with-asp-net-mvc-4/ http://codemadesimple.wordpress.com/2012/06/18/timesync-with-asp-net-mvc-4/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从服务器获取数据直至Javascript的最快方法 - Fastest way to get data from server up to Javascript 找到用于在浏览器中调试 javascript 的侦听器的最快方法是什么? - What is the fastest way to find a listener for debugging javascript in a browser? 从网站抓取和获取不同项目的最快方法是什么 - what's the fastest way to web-scraping and get different items from a website 在 JavaScript 中获得最高(最左边)位位置的最快方法是什么? - What is the fastest way to get the position of highest (most left) bit in JavaScript? 在 JavaScript 中获取无样式元素的高度/宽度的最快方法是什么? - What is the fastest way to get height/width of unstyled element in JavaScript? 有没有办法在浏览器 Javascript 中获取时区缩写? - Is there a way to get time zone abbreviations in browser Javascript? 用来自JavaScript数组的数据创建HTML表的最快方法是什么? - What is the fastest way to create HTML table with data from JavaScript array? 在浏览器中显示图像的最快方法是什么? - What's the fastest way to display images in browser? 将二进制数据传递到浏览器的最快方法是什么? - What is the fastest way to deliver binary data to browser? 是什么使它成为在Web浏览器中打印1到1,000,000(以空格分隔)的最快的JavaScript? - What makes this the fastest JavaScript for printing 1 to 1,000,000 (separated by spaces) in a web browser?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM