I'm using jquery ajax, how to clear the cache of the ajax result?
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Using :remote => true with hover event
- Is there a way to play audio on a mobile browser w
Are you looking for $.ajax cache option? http://docs.jquery.com/Ajax/jQuery.ajax#options
You can't actually clear the cache as it's controlled by the browser, but you can ask for the next request not to be cached by adding
cache: false
to your options.If you want to bypass the cache you can add some random argument to the url:
You add a counter for every request. Ajax will cache the call but as the counter increments everytime, the params to load jsp will become different.