Douglas, On 2/14/16 9:44 PM, Douglas W. Goodall wrote: > I have written a very simple pair of cgi scripts in python that display > a toggle switch either > in the up position, or in the down position. When you click on the > switch, it toggles between > the two and switches between the images appropriately. At least that is > what it is supposed > to do. > > The problem presented itself as the switch always being in the down > position, no matter > how I toggled and switched between the cgi scripts. > > Here is the down > and here is the up. > > I checked in the browser debugger and the cgi scripts were trying to > send the proper images. > I tried the in the Mac OS X based Safari and Chrome and had identical > results. > > When I eventually gave up and used different switch images, the problem > went away, so it > is my best guess that there is something pathological about the binary > contents of the images > making the Web Server send a cached version of the down switch image > instead of the up > switch image that is needed. If the URL of the switch image the same in both cases (e.g. /images/switch_state.cgi)? If so, you may be dealing with browser caching. Use the usual cadre of response headers to instruct the client not to cache the response. If not, then the problem may still be a cached image, possibly from a time where the URL pointed to the wrong image. Using Chrome's dev tools, you can see exactly what the client HTTP request and server HTTP response look like. That may help find out what's going on. -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx