Bootstrap 4.1.3 modal body retains jquery returned data. How to clear cache for each new request?
I have a form that submits data via jquery which is then shown via bootstrap modal. However, the problem is that, if I quickly try to give new values to the form then the modal body sometimes doesn't show freshly calculated values but shows the old cached values. How can I destroy the modal cache data in bootstrap 4 ? I have tried various bootstrap3 tips but it just wouldn't work and I still see old cached data intermittantly. Here is what I tried. $('#modalForm').on('hidden.bs.modal', function () { $('#modal_content').empty(); $('#modalForm').modal('dispose'); $(this).find('form').trigger(