Compdigitec Labs

« | Home | »

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 »

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

  1. สล็อตแตกง่าย Says:
    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/ […]

  2. Esport Says:
    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/ […]

  3. DevOps Services Says:
    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/ […]

  4. good fullz shop Says:
    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/ […]

  5. สล็อตวอเลท ไม่มีขั้นต่ำ Says:
    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/ […]

  6. 贏家娛樂城 Says:
    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/ […]

  7. Where to buy buy magic mushrooms online in Oregon Says:
    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/ […]

  8. adhd doctors fairfax va Says:
    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/ […]

  9. จำนองที่ดิน Says:
    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/ […]

  10. live draw sydney Says:
    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/ […]

  11. limanbet giriş Says:
    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/ […]

  12. sanal sunucu Says:
    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/ […]

  13. 토토세콤 Says:
    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/ […]

  14. Hidden Wiki Says:
    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/ […]

  15. voir ce site Says:
    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/ […]

  16. his comment is here Says:
    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/ […]

  17. best Cambodian Cubensis Mushrooms in Canada Says:
    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/ […]

  18. play on Pokermatch Says:
    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/ […]

  19. buy magnum research guns Says:
    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/ […]

  20. 포인트홀덤 Says:
    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/ […]

  21. additional reading Says:
    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/ […]

  22. แทงบอล Says:
    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/ […]

  23. look what i found Says:
    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/ […]

Comments