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

前端 未结 3 1147
礼貌的吻别
礼貌的吻别 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:48

    An alternative would be to append a unique number to the url.

    
    

    timestamp isn't quite unique, but it should be unique enough for your usecase.

提交回复
热议问题