IE9 window.location.href error

In my asp page, I have used the following javascript code for redirecting url.This code works well in native IE7, IE8, Chrome, FireFox and IE9 compatibility mode but not in IE9. While using IE9, first time it works fine but next time shows "404 - File or directory not found.The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable" error.


To know what I mean please open with IE9 and on the left side menu, scroll down until you see the U10- DUBEY, U10 - SALONIS or any below button and click one of them and the schedule displays but when click another button you will get 404 - File or directory error.Please let me what is issue. Thanks, Ravi


This solution works better in most of the cases:


For IE9:

    window.location = "<%=strURL%>";

Try using instead of location. This solved my problem with long urls perhaps it will help you here

I had a similar problem, but it went away when I closed and reopened IE9.

Need Your Help

Using different codeception environments

php unit-testing codeception

I am working on some Unit Tests for an API using Codeception. The idea is to make sure that each API call returns the expected response codes and a JSON object in a desired format.