LoginSignup
36
35

More than 5 years have passed since last update.

レスポンスヘッダからサーバタイムを取得する方法

Last updated at Posted at 2013-02-18
$.ajax({
  type    : 'GET',
  url     : '',
  cache   : false,
  success : function (data, status, xhr) {
    var date = new Date(xhr.getResponseHeader('Date'))
      ;
  }
});

テストした環境

Webサーバ バージョン
Apache 2.0
Nginx 1.2.0
ブラウザ バージョン
Chrome 24.0.1312.57
Safari 6.0.2
Firefox 18.0.2
Opera 12.12
IE 6,7,8,9,10Pre
36
35
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
36
35