## Fixing “Error: window.location.refresh is not a function”

By admin | July 23, 2010

If when you try to refresh the page using Javascript back-end and instead of having the page refresh like you want it to refresh, instead it bounces back into your Javascript Console with a cryptic error that reads “Error: window.location.refresh is not a function“. This can be very puzzling, especially if you are not a regular JavaScript programmer, so one can look into the documentation:

There’s just one small problem – it’s actually object.reload, not object.refresh! Some poor quality websites (or popular websites which make mistakes) accidently specify location.refresh instead of location.reload. So instead of calling location.refresh(), one should call the following to refresh the page:

window.location.reload();

Topics: (X)HTML | 4 Comments »

### 4 Responses to “Fixing “Error: window.location.refresh is not a function””

1. กล่องอาหาร Says:
September 16th, 2021 at 04:11

[…] Find More on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]

2. kardinal stick Says:
October 19th, 2021 at 19:29

[…] Information to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]

3. nova88 Says:
November 12th, 2021 at 19:25