URL Load problem in IE

When we hit Enter on the URL, it doesn’t reload in IE. It just shows the data from cache. So we don’t get the exact view as  it should. In other browser it works fine, but in IE it doesn’t…

When we test a web application, we test it on different web browsers like Mozilla, IE, Safari, Google Chrome, Opera. Many times we found that the application runs fine in all browsers except IE. Because IE doesn’t support some css or it acts
differently to some actions compared to other browsers.

Here I am going to discuss one of the deviation in IE. And that is ” In Every browser when we press an Enter in the URL, it reloads. But in IE it doesn’t. It just fetch the data from the cache. Even if on clearing cache won’t fix the issue. If we
want to reload it then we have to refresh it. “.

The solution to this is just reload it through java script code or redirect to the same page.

Reload through java script:-
window.location.reload();\* This will resend the data again to the same page. *\

And if you want to redirect:-(In PHP)

(In JavaScript)
window.location.href = “URL of that page”;

Lets look to an example where we need this:- Normally what we do in a login page is, on successful registration we redirect to home page. Its the traditional way. But if we want it through Ajax Call means the login is done through ajax and on successful registration, it updates only a div on the header of that same page. Then you hits enter on the url, what it should do is to reload the page again. That what happens in every url but not in IE. It will show the page as it was before login. It doesn’t matter how many times you hit enter on

url, the result is same. But if you press F5 means Refresh it, it will show the changes. So we need to redirect the page on successful registration to show the changes effectively in IE.

150 150 Burnignorance | Where Minds Meet And Sparks Fly!