This is a migrated thread and some comments may be shown as answers.

Do not send the modified response to the browser cache?

6 Answers 435 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
herson
Top achievements
Rank 2
Veteran
herson asked on 29 Jan 2021, 05:19 PM
is there a way to not store the modified file in response in the browser cache? When I modify the file it stays in the browser cache so when I open the browser without the fiddler and enter the page it continues with the modification. is there a way to prevent this file from going to the browser's cache? Thanks

6 Answers, 1 is accepted

Sort by
0
Accepted
Nick Iliev
Telerik team
answered on 02 Feb 2021, 09:07 AM

Hello Herson,

 

In the default case, a request satisfying the browser caching policies set through Cache-Control, Expires, Vary, and ETag headers will be loaded from a local cache and won't go through the proxy. That said, as Fiddler is a web proxy, if your request is set to use a valid browser cache, it would be expected that it will continue to use that cache (until it is not expired and is a valid cache). So a solution would be to either clean your browser cache or test while changing the browser cache policies set through the related request/response headers.

 

Regards,
Nick Iliev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
herson
Top achievements
Rank 2
Veteran
answered on 02 Feb 2021, 10:30 AM
Isn't there a way to make this cache expire right after the response?
0
Accepted
Nick Iliev
Telerik team
answered on 02 Feb 2021, 11:02 AM

Hi Herson,

 

You should be able to set Cache-Control with max-age=<seconds>

max-age=<seconds>
The maximum amount of time a resource is considered fresh. Unlike Expires, this directive is relative to the time of the request.

Alternatively you could use Expires header for the response:

The Expires header contains the date/time after which the response is considered stale.

Invalid dates, like the value 0, represent a date in the past and mean that the resource is already expired.

If there is a Cache-Control header with the max-age or s-maxage directive in the response, the Expires header is ignored.

So that said, use the Auto Responder to create a rule that sets the desired max age or the expiration date.

 

 

Regards,
Nick Iliev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
herson
Top achievements
Rank 2
Veteran
answered on 02 Feb 2021, 01:46 PM
Understand. but this only works on the fiddler. If you close it, the cache remains in the browser when you open the modified page.
0
herson
Top achievements
Rank 2
Veteran
answered on 02 Feb 2021, 01:57 PM
Oh. Sorry. It worked with Cache-Control: no-cache. is it possible to do this automatically in my reponse by script? Cache-Control: no-cache? thanks.
0
herson
Top achievements
Rank 2
Veteran
answered on 02 Feb 2021, 02:45 PM
Thanks a lot. Works perfectly. 
Tags
Fiddler Classic
Asked by
herson
Top achievements
Rank 2
Veteran
Answers by
Nick Iliev
Telerik team
herson
Top achievements
Rank 2
Veteran
Share this question
or