whyu9 / chrome-rest-client

Automatically exported from code.google.com/p/chrome-rest-client
0 stars 0 forks source link

Responses are cached making the client completely useless for development #180

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Do a request to your local service http://localhost:8080/whatever ... get a 
response (200, and all the stuff)
2. ups, I did a mistake, fix the service and restart the server
3. Do the request again.. the Rest client keep returning the previous response 
(in my case a json) even if I fixed the service and the body has changed!!!

What is the expected output? What do you see instead?
The rest client should RE DO the request every time! what's the point of having 
a REST client if I can't rely on it actually re-doing the request every time?

On what operating system, browser and browser version?
Linux Debian jessie, Chrome Version 26.0.1410.63

Please provide any additional information below.

Original issue reported on code.google.com by daniele....@gmail.com on 16 May 2013 at 4:25

GoogleCodeExporter commented 9 years ago
May be useful: this is the response header I get from my server:

200 OK  Loading time: 11
Request headers 
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like 
Gecko) Chrome/26.0.1410.63 Safari/537.31
Content-Type: text/plain; charset=utf-8 
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,it-IT;q=0.6,it;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Response headers 
Cache-Control: public, max-age=3600, s-maxage=3600 
Content-Type: application/json;charset=UTF-8 
Content-Language: en_US 
ETag: "fdb010b093e442a4509f9209aab9ca5f" 
Last-Modified: Thu, 16 May 2013 16:10:14 GMT 
Date: Thu, 16 May 2013 16:27:21 GMT 
Vary: Accept, Accept-Language 
Age: 0 
Server: Jetty(6.1.21) 

it takes more or less 4 seconds, when I do the second time it take 11 
milliseconds and the server doesn't receive any call.

REST Client: Application version: 3.1.5

Original comment by daniele....@gmail.com on 16 May 2013 at 4:30

GoogleCodeExporter commented 9 years ago
Hi,
Thanks for your issue report. 

The app is not managing Chromes internal caching system. All requests (event 
those made by the application) are internally cached by Chrome. 
While developing you should disable cache. Go to Chrome Developer Tools -> 
Settings -> under "General" select "Disable cache".

Original comment by jarro...@gmail.com on 16 May 2013 at 4:58

GoogleCodeExporter commented 9 years ago
Nope.
I never had to disable the cache while developing.

And I'm not gonna disable it now.

Your client should make sure chrome do not cache its request.
Other REST client out there can do that just fine without me having to disable 
caching.

Your client is well done in terms of UI and features but if you are not fixing 
this I'm gonna uninstall it and rate it low, sorry but that's a must for an 
application like this.

Regards

Original comment by daniele....@gmail.com on 16 May 2013 at 5:02

GoogleCodeExporter commented 9 years ago
I did a quick look for hows other clients avoid cache in chrome. And they do it 
in the way that i can't afford. They either append random string for URL or add 
no cache headers. 
I will not alter the request you made to avoid cache system. It shouldn't work 
this way. ARC must works like browser will in production env. Either use proper 
HTTP cache headers with your request or disable cache. I decided not take any 
action on this.

Original comment by jarro...@gmail.com on 16 May 2013 at 5:57

GoogleCodeExporter commented 9 years ago
A tip for anyone reading this, The rest client is working fine. If you want to 
make sure Chrome is always fetching data from server disable Chromes cache in 
the Developer Toolbar instead. (Usually) F12 -> Settings (in the lower right 
corner) (to bring it up on a mac look in the menus instead something like 
<apple key>+<shift>+I)

Original comment by polyz...@gmail.com on 13 Sep 2013 at 5:35