It looks like if I load dynamic content using $.get()
, the result is cached in browser.
Adding some random string in QueryString seems to solve this iss
Of course "cache-breaking" techniques will get the job done, but this would not happen in the first place if the server indicated to the client that the response should not be cached. In some cases it is beneficial to cache responses, some times not. Let the server decide the correct lifetime of the data. You may want to change it later. Much easier to do from the server than from many different places in your UI code.
Of course this doesn't help if you have no control over the server.