Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Force refresh a Server Request at design Time
Fri, Jun 1 2018 5:49 PMPermanent Link

jdforce

Avatar

(In the IDE, at design time) Am using a server request to get a Json from a linux server, and I was having errors.
I noted that the ServerRequest received response is always getting the same answer from the server, which was not possible.

So I checked the server and ran the emitted application out of the IDE and it works properly.  Refreshing the page indeed shows the proper information

Back in the IDE, response received is always the same, unless I shutdown and restart the IDE every time I make changes.  This is some sort of cached response.  

Tried (always in the IDE)  with ctrl-f5 but it restarts the app without changing the ServerRequest response received, which at this point is completely different.

How can I force a refresh of the received response?
Sat, Jun 2 2018 12:50 PMPermanent Link

Matthew Jones

You need to stop it caching the responses. I had this, not sure if I
posted. Ideally have the server set the no-cache header.
Sun, Jun 3 2018 11:09 AMPermanent Link

Ralf Mimoun

Disabling the caching mechanisms of the browsers can be tricky. If I have to be 100% sure that the browser does not play tricks with me, I add a random parameter, like "Request.Params.Values['Dummy'] = IntToStr(Random())". Ugly, yes, but it works. And yes, it is not really 100% perfect because you might get the same number in a row.


Matthew Jones wrote:

You need to stop it caching the responses. I had this, not sure if I
posted. Ideally have the server set the no-cache header.
Mon, Jun 4 2018 3:05 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< How can I force a refresh of the received response? >>

Adding this header will work:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

Cache-Control: no-cache

will do the trick.




Tim Young
Elevate Software
www.elevatesoft.com
Image