Hello,
When I use put command for calling http request then sometime it does not seems to return the new results, ( It could be either the proxy server at client side is returning the results from the cache or the server at out side is caching those requests )
Any idea about the script that can set http header to "No Cache" so that It always get the new results from the server ?
Is there any way to set the global property so that I do not need to set http headers in all places whereever I am forming http requests ?
Please let me know if you have some insights.
Thanks
Best Regards
Pradeep
What to put in http header to avoid caching ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi Pradeep,
To prevent client-side caching, the server would include
Cache-Control: no-cache
in the HTTP headers. Server-side caching really is a server-side matter and there is little or nothing you can to against it, unless you are the admin of the server.
Do you have any additional information regarding the problem?
Best,
Mark
To prevent client-side caching, the server would include
Cache-Control: no-cache
in the HTTP headers. Server-side caching really is a server-side matter and there is little or nothing you can to against it, unless you are the admin of the server.
Do you have any additional information regarding the problem?
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Proxy server on client side seems to cache the results
Hello Mark,
I am asking clients to download the software which looks like the link below.
http:///www.xyz.com/player.exe
After updating the player.exe on the server, When I ask client to click on the above type of link and ask them to run the software then it is not taking the new exe always.
So It seems that proxy server on client side is not getting the latest exe from our server. Perhaps the proxy on client side is caching the exe on their firewall. Is there any way to avoid such problems ?
Another problem is how to make sure that whenever rev client sends http request, then proxy on clients always get the response from the server for each query. One way to solve the proble is appending the random parameters in each url, but for this things, the code has to be modified in many places.
Is there a way so that one can set the global propery of html headers in rev script to avoid a caching problems?
The response results is plain text generaated by php. I am not generating html headers in the response. Can I still avoid caching problems?
Please let me know if it is not clear enough.
Thanks
Best Regards
Pradeep
I am asking clients to download the software which looks like the link below.
http:///www.xyz.com/player.exe
After updating the player.exe on the server, When I ask client to click on the above type of link and ask them to run the software then it is not taking the new exe always.
So It seems that proxy server on client side is not getting the latest exe from our server. Perhaps the proxy on client side is caching the exe on their firewall. Is there any way to avoid such problems ?
Another problem is how to make sure that whenever rev client sends http request, then proxy on clients always get the response from the server for each query. One way to solve the proble is appending the random parameters in each url, but for this things, the code has to be modified in many places.
Is there a way so that one can set the global propery of html headers in rev script to avoid a caching problems?
The response results is plain text generaated by php. I am not generating html headers in the response. Can I still avoid caching problems?
Please let me know if it is not clear enough.
Thanks
Best Regards
Pradeep
-
- Posts: 179
- Joined: Sat Apr 08, 2006 11:08 pm
- Location: London, UK
- Contact:
Re: Proxy server on client side seems to cache the results
Pradeep, I don't believe that there is a way to permanently set the httpHeaders as you'd like, but you could write a simple wrapper function:
so instead of "put URL someUrl into someVariable",
you'd have "put getURL(someURL) into someVariable".
Secondly, though you can't do much with it, you could at least see what the server is doing by checking what is returned by libURLLastRHHeaders() after each call to the server.
Best,
Mark Smith
Code: Select all
function getURL pURL
set the httpHeaders to "Cache-control : no-cache"
return URL pURL
end getURL
you'd have "put getURL(someURL) into someVariable".
Secondly, though you can't do much with it, you could at least see what the server is doing by checking what is returned by libURLLastRHHeaders() after each call to the server.
Best,
Mark Smith