BZ1034588 : stale local cache file in UrlResource (cherry-picked from fe42528c978e78d94857db030db74c172766429e)
(cherry picked from commit af0028cbd54a91b5ce450febd3529f287ea2579f)
BZ1034030 : 0 byte local cache file in UrlResource (cheery-picked from 05196fa8d56043cb2ce56db952d4fae17b29f27e)
(cherry picked from commit d5e335b869de193373511c27e24f2ca119fa2100)