« Updated Roadsend PHP Compiler 2.9.8 packages | Home | Setting up a Subversion server using Apache on Ubuntu »
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:
object.reload( [bReloadSource])
Reloads the current page
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();
If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: (X)HTML | 23 Comments »
February 15th, 2022 at 01:38
… [Trackback]
[…] There you will find 87311 additional Info to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
February 17th, 2022 at 12:52
… [Trackback]
[…] Find More on on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
March 29th, 2022 at 06:27
… [Trackback]
[…] Find More Info here to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
June 14th, 2022 at 04:55
… [Trackback]
[…] Info on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
August 4th, 2022 at 20:06
… [Trackback]
[…] Information on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
August 30th, 2022 at 18:42
… [Trackback]
[…] Here you will find 68771 more Info on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
August 31st, 2022 at 12:48
… [Trackback]
[…] Info on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
September 27th, 2022 at 18:16
… [Trackback]
[…] Read More on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
October 2nd, 2022 at 00:38
… [Trackback]
[…] There you can find 44981 additional Info to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
October 5th, 2022 at 09:50
… [Trackback]
[…] Read More on to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
October 23rd, 2022 at 14:20
… [Trackback]
[…] Read More here on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
December 14th, 2022 at 05:58
… [Trackback]
[…] Find More Information here to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
December 23rd, 2022 at 09:19
… [Trackback]
[…] Find More on on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
January 2nd, 2023 at 23:31
… [Trackback]
[…] Here you can find 48774 more Information to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
January 9th, 2023 at 21:36
… [Trackback]
[…] Information to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
January 12th, 2023 at 21:31
… [Trackback]
[…] Read More Info here to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
January 28th, 2023 at 07:03
… [Trackback]
[…] Read More to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
February 6th, 2023 at 20:35
… [Trackback]
[…] Info to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
February 10th, 2023 at 05:40
… [Trackback]
[…] Information on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
February 20th, 2023 at 03:22
… [Trackback]
[…] Find More on on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
February 27th, 2023 at 15:54
… [Trackback]
[…] Read More Info here on that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
March 9th, 2023 at 04:20
… [Trackback]
[…] Info to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]
March 13th, 2023 at 13:42
… [Trackback]
[…] Here you will find 22125 additional Information to that Topic: compdigitec.com/labs/2010/07/23/fixing-error-window-location-refresh-is-not-a-function/ […]