Original Post
How can I prevent the clients browser from caching the servers response to a request. I need the client to the update frequently but I don't want it to use a cached version of the servers response as, chances are, things will have changed by that time. I am also having trouble with the browser caching javascript files which isn't good because if I update them the browser will use it's cached version rather than the new one which causes things to break. The same applies to images. If I update an existing image the end users browser will display the old, cached version. I think I have to use the PHP header() function but I'm not sure what to put in it. EDIT: I've just read something about adding random numbers to the end of a URL to prevent the browser loading a cached version but I'm not sure I understand what it means.