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:


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 | 4 Comments »

4 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: […]

  2. Esport Says:
    February 17th, 2022 at 12:52

    … [Trackback]

    […] Find More on on that Topic: […]

  3. DevOps Services Says:
    March 29th, 2022 at 06:27

    … [Trackback]

    […] Find More Info here to that Topic: […]

  4. good fullz shop Says:
    June 14th, 2022 at 04:55

    … [Trackback]

    […] Info on that Topic: […]