I have created a program which uses the TCP Client Socket to get an HTTP page on port 80 from a site that I control. I am testing it on a Mac but will be using it on a Pi. The problem I have is that every time I run the program it appears to be returning cached content as the result (using sync connection). I have tried purging, disconnecting, etc but it still returns a cached version. The content on the server has changed and if I use a browser it returns the changed content correctly. I have checked the headers and am always getting a HTTP 200 but the Xojo program always returns the content from when the program was first run even if I restart the program etc it still returns the first content. Any suggestions on why this is doing this and how I can resolve the issue. I know MBS do a cUrl option but need this to run on a Pi without having to use third party stuff. Thanks
Client sockets don’t cache but some web servers and proxies do. Is the content you are getting back actually valid but just stale or are you seeing an invalid response as well? You might try setting a User-Agent header in your HTTP request.
Curious: Any reason why you don’t just use the built-in HTTP classes?