Force Cache-Control: no-cache in Chrome via XMLHttpRequest on F5 reload

前端 未结 3 1145
礼貌的吻别
礼貌的吻别 2020-12-08 12:09

I want to ensure that data I request via an AJAX call is fresh and not cached. Therefor I send the header Cache-Control: no-cache

But my Chrome Version

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 12:46

    http.setRequestHeader("Cache-Control", "no-cache, no-store, must-revalidate");
    

提交回复
热议问题