Twitter Bootstrap Modal cache on Microsoft Edge and IE (late versions)

I am having an issue using Twitter Bootstrap modals, whereby my ajax calls are not being updated in my Bootstrap modals. They are how ever affecting the database.

For example.

I will submit a new Citizenship, how ever - the modal which displays a list of citizenship's does not reflect this change.

Is there a way to clear the cache or have a nocache flag when lauching the modal or in the controllers?

This is the jQuery method which is called upon clicking a link to populate the modal.

$("body").on("click", ".modal-link", function(e) {
     e.preventDefault();
     $(this).attr("data-target", "#settings-modal");
     $(this).attr("data-toggle", "modal");
});

This is the link which is clicked:

@Html.ActionLink("Citizenships", "Index", "Citizenships", new {@class = "modal-link",title = ""})

Answers


You can use $.ajaxSetup({ cache: false }) to prevent ActionLinks from being cached. Place it at the end of the document or call it when the document is ready.


Need Your Help

Usable frameworks for MySQL, PHP, HTML, JS

javascript php html mysql frameworks

For some years I used to code on PHP, MySQL and JS. And recently I opened for my self Twitter Bootstrap, and ready-to-use HTML templates. I feel that there are many other frameworks which can be us...

User permission to specific Extension in Joomla

php joomla joomla1.7

I have a specific Extension installed in my Joomla version 1.7.2 . I want a particular group of user can access that extension in Joomla Admin how can I achieve that?