IE11 does not properly redirect URLs after using window.location.reload(true)

Whenever the session expires, I make a call to the server using window.location.reload(true). After clicking the button, the server is contacted to retrieve details. However, in Internet Explorer 11, the URL does not change in the browser and the same page (timeout page) is displayed even after successful login. This works correctly in Chrome and other browsers.

<a href="/" onclick="window.location.reload(true)">Restart Session</a>

This function works in Chrome but has issues in IE versions 10 and above.

Answer №1

This is a test:

alert("this page will refresh automatically")

function autoRefresh() {

    setTimeout(function () {
        location.reload()
    }, 100);
}
<input type="submit" value="auto refresh" data-wrapper-class="custom-btn" data-corners="false" id="refreshButton" onclick="autoRefresh()">

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Maven, Protractor, and Selenium WebDriver team up for efficient integration testing

Our team has developed a web application that utilizes Java on the back-end and Angular for the user interface, with Maven serving as the build system. We've been working on setting up automated integration testing with Protractor, but despite extens ...

Output a message to the Java console once my Selenium-created Javascript callback is triggered

My journey with Javascript has led me to mastering callback functions and grasping the concept of 'functional programming'. However, as a newcomer to the language, I struggle to test my syntax within my IntelliJ IDE. Specifically, I am working on ...

Extracting JSON Value from a Script Tag

Seeking a more efficient method to extract the designated JSON value (highlighted in yellow) that is currently acquired using the code below. Although effective, it lacks efficiency. $("head > script:nth-child(55)").text().trim().replace(" ...

Using the ES6 filter method to iterate through a double nested array of objects

Struggling with filtering a nested array of objects and specifically stuck at the filter part. Any idea on how to eliminate one of the marks? this.state = { data: [ { id: 1, name: "Main", subs: [ { id: "jay", ...

Obtain the data from a nested array

I'm facing a situation where I have the following code: var obj = { level1 : { level2 : 'value' } }; I also have another object: var returnData = { value: "level1.level2", anotherThing: "level1" }; The goal is to ...

What is the alternative method in JavaScript for locating items instead of using indexOf?

I have a set of paths in an array. Some paths are classified as constants while others are labeled as dynamic. A constant path would be something like "/booking-success", whereas a dynamic path could be something like '/arrival/view/:job_or ...

Tips for updating content (wishlist) without the need to refresh the page

Currently experimenting with the TMDb API to enhance my PHP skills. I've successfully created a wishlist feature and now looking to optimize the script. A function is implemented on each movie page for adding movies to the wishlist. function getButt ...

Issue with undefined object reference in Moment.js when making an ajax request

Currently, I am working on developing a straightforward booking calendar using Eonasdan's bootstrap-datetimepicker, which relies on the moment.js library. To incorporate localization, I have included the necessary file. My setup consists of linked pic ...

Unity3D: Troubleshooting a Code Issue

Encountering an issue with my code and struggling to find a solution. I've tried moving my c# script up to the standard assets folder as suggested in my research but it didn't resolve the problem. Any assistance would be greatly appreciated! Than ...

Is there a way I can create an object in JavaScript by using an array of values as parameters instead of having to manually list them out?

Can I achieve this? My goal is to develop a universal factory function that can generate different types of factories with some commonalities. I aim to pass arguments as an array to the base factory, which would then potentially create a new object instanc ...

Preventing React setState from replacing the entire object

When attempting to update a customer's age using setState, the object is altered before calling setState, but the existing object is not updated. customerOnChange(event, field) { //Customer's age currently set at 80 var customer = { ...t ...

Is it possible to preserve the query parameters from the previous page using Vue Router's Navigation guard feature?

Hey there! So, I'm looking to pass a query from the current page to the next one without manually coding it into all of my push functions. I was wondering if there's a way to do this through Navigation guard or some hooks? I did some research an ...

Having difficulties testing the functionality of redux-form

I am struggling with testing react components that use redux-form. My integration tests are failing, indicating that I have not set up the tests correctly. There seems to be a consensus in discussions on this issue, both here and on GitHub. Any assistance ...

Issue with ng-repeat directive not functioning

Let's dive into this directive: .directive('img', function () { return { restrict: 'E', link: function (scope, elem, attr) { if (attr.src && attr.type === "extension"){ var ...

Once a new element is inserted into the DOM, it no longer triggers the same functions as before

<script type="text/javascript"> $(function(){ $('button').each(function(i){ $(this).click(function(){ $(this).after('<br /><button type="button">Button</button>'); }); }); }); ...

Save a PHP variable and then use it on an HTML page

Is there a way to preserve the value of LAST_INSERT_ID(), also known as Case_ID, so that it can be accessed in another HTML page? If so, what would be the best approach to achieve this? $query.= "insert into Picture (Case_Pic,Case_ID) values ...

During the session, the variable is updated twice within the data

Whenever a new price is received, the following formula should be applied: totalprice = totalprice + cart[i] For instance, if the totalprice was previously 500 and a new price of 800 is added, the totalprice should calculate as (500 + 800) instead of the ...

Regular expression for parsing any CSS font properties

Does anyone have a reliable regex to break down a css font string into its individual components? 12px arial italic bold sans-serif 12px/50px verdana etc ...

Attempting to select an image with the intention of triggering a modal to appear through an ajax

Hi there, I recently started coding and I'm facing an issue that I can't seem to solve. I want to set it up so that when you click on an image, a modal opens corresponding to the img tag, and then the modal click event triggers a method. The prob ...

A step-by-step guide on sending a fetch request to TinyURL

I have been attempting to send a post request using fetch to tinyURL in order to shorten a URL that is generated on my website. The following code shows how I am currently writing the script, however, it seems like it's not returning the shortened URL ...