jQuery ajax only works in IE when the IE debugger is open

It was very annoying. Ajax request not works perfectly in IE. But when developer tool is opened ajax quires are works fine. It was very cumbersome . It happened because IE chache Ajax requests. When Developer tool opened it is always refresh from server.

I get this fixed by making cache false in ajax request.


$.ajax({
type: "GET",
url: url,
dataType: "html",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({}),
cache: false,
success: function (r) {
}
});

I think it might help you.

Advertisements

I am a passionate software developer. I develop software using microsoft technologies and other trending web technologies. currently works at sitecore as a developer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s