View Full Version : client machine not reflecting changes on server
gib65
07-21-2011, 07:37 PM
Hello,
Every once in a while, I have to tolerate something intolerable. I make a change to a website and the change doesn't show up on the client side. This occurs across browsers and it occurs even after I've deleted my browsing history. I've been told that sometimes the client machine goes only so far as a proxy server, and if the proxy server hasn't been updated as to the changes uploaded to the source server, those changes will not be reflected on the client machine.
I would like to know, first, if this is true, and second, if it is, how can I either prompt the proxy server to update or bypass the proxy server and go directly to the source.
this is sometimes true. some solutions:
1) best solution is to configure your server to send the proper headers along with your pages, indicating that they should not be cached, or setting an expiry date for them. Contact your web host to determine the best way to do this (or, if you're using PHP or another server-side language, you can send the proper headers in your script).
2) if it is just you wanting to see the changes as you make them (to make sure they're correct!), you can simply add a nonsense query string to the URL: instead of asking for
http: //www.example.com/mypage.html, ask for
http: //www.example.com/mypage.html?query=gibberishorwhatever
passing a unique query along should make the browser and proxy treat it as a unique request, and not serve the cached page.
gib65
07-21-2011, 09:41 PM
Neither one of those seems to be working.
Here's what I put in my header:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
The problem may be complicated by the fact that its a java webstart application that I'm updating. Is it possible that the no-cache and the query work on retrieving client side scripts and whatnot but not necessarily server side applications?
I'm sorry; I didn't mean a <meta> element in the page head. You need to configure your server to send an http header.
as far as server-side apps go: no, the query "tricks" the browser/proxy into thinking that it is a unique page request, while the no-cache headers inform the browser/proxy that it should never save to the cache (it is just a suggestion, however; the browser/proxy still does whatever they like).
if your server gets the request, it should run the script anew. I can't think of any reason that your server would send a cached copy - unless your host does something screwy. Caching would more likely occur downstream, either by the browser or proxy/ISP.
It is java, correct (not javascript)? If you're talking about a java app, that runs on the client's machine, then it would be more dependent on the java program.
gib65
07-22-2011, 05:39 PM
It is java, correct (not javascript)? If you're talking about a java app, that runs on the client's machine, then it would be more dependent on the java program.
Yes, it runs on the client machine, but it is retrieved from the server. It is Java, not Javascript. They call it Java webstart.
I might as well give you the link to the page (which I should have done to start with) and you can see what I mean: http://www.shahspace.com/jws/mazemania/mazemania.html
I'll have to research how to configure my server to send http headers.
if you use php, you can use the header() function:
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the pastI'm sure other server-side languages have similar capabilities. the server itself (e.g., Apache) can be configured to do so as well.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.