72572/how-to-prevent-browser-caching-of-ajax-call-result
I load dynamic content using $.get(), the result is cached in browser.
Adding some random string in QueryString seems to solve this issue (I use new Date().toString()), but this feels like a hack.
Is there any other way to achieve this? Or, if unique string is the only way to achieve this, any suggestions other than new Date()?
Hii,
JQuery's $.get() will cache the results. Instead of
$.get("myurl", myCallback)
you should use $.ajax, which will allow you to turn caching off:
$.ajax({url: "myurl", success: myCallback, cache: false});
Hope this work!!
Thank You!
You have to download the file with ...READ MORE
Hii, You can solved this issue by: Adding a ...READ MORE
Hello @kartik, It is very easy toi disable ...READ MORE
Hii @kartik, Using javascript <script> $("a[href='#top']").click(function() { ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
Hello, This is simple you just need to ...READ MORE
Hey @kartik, Named routing is another amazing feature of ...READ MORE
Hii kartik, You can resolved this issue like ...READ MORE
Hii, In order to handle a timeout: var xmlHttp ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.