ETag and If-None-Match HTTP Headers are not working

前端 未结 2 570
隐瞒了意图╮
隐瞒了意图╮ 2021-02-08 02:04

I have a file in my webserver and I am downloading that to my app everytime I access it because its possible that file content might be changed But If it is changed I w

2条回答
  •  北海茫月
    2021-02-08 02:14

    I've encountered the same problem. I've discovered that it's because of cachePolicy. You need to set it as follows:

    request.cachePolicy = .ReloadIgnoringLocalAndRemoteCacheData
    

    And you will be OK

提交回复
热议问题