Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
特定のタイプのユーザーのセッション タイムアウトを防ぐために、アプリケーションにいくつかの JavaScript コードを記述しました。タイムアウトはサーバーによって制御されます。どうすればいいですか?
セッションを更新するページにヒットするサーバーを呼び出します。
function ping() { var img = new Image(); img.src = "somePage.php?ts=" + (new Date()).getTime(); window.setTimeout(ping,60*1000); }
画像リクエストの代わりに Ajax 呼び出しを行うことができます。