I’m using ASP.NET MVC 3 to create a webapp that hosts business games.
On the setup part I have to create multiple teams to play the games.
To dynamically add teams I use this script.
$("#addTeam").click(function () {
$.get("@Url.Action("NewTeam","Admin")", function (template) {
$("#teams").append(template);
});
});
In the background this calls a method in my Controller. In that method, I generate a new instance of my viewmodel which (in his turn) creates a new (random) color for each team.
If I test this in Firefox, I get different colors for each team.
But when I test it in Internet Explorer, I only get one color for all the teams.
My controller action is also only called once.
Has anybody seen this behavior before? It looks like Internet Explorer is not executing the HTTP get every time I click the link.
Thanks for the help.
Seems like a caching issue. Try busting the cache:
or: