summaryrefslogtreecommitdiffstats
path: root/dom/base/test/file_browser_refresh_expired_resource.sjs
blob: ab5cdcf78d27a3c057d1613d9abcbaa461927441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
"use strict";

function handleRequest(request, response) {
  if (getState("expired_resource") == "") {
    response.setHeader("Content-Type", "text/html", false);
    response.setHeader("Cache-Control", "max-age=1001");
    setState("expired_resource", "ok");
  } else {
    response.setHeader("Content-Type", "text/html", false);
    response.setHeader("Cache-Control", "max-age=1003");
    setState("expired_resource", "");
  }
}