Loading ...
Sorry, an error occurred while loading the content.

window.location.href = window.location.href

Expand Messages
  • thefsb
    window.location.href = window.location.href; is a standard web programming technique to reload the page WITHOUT re-POSTing the form. But JSLint says Weird
    Message 1 of 1 , Jul 20, 2011
    • 0 Attachment
      window.location.href = window.location.href;

      is a standard web programming technique to reload the page WITHOUT re-POSTing the form.

      But JSLint says "Weird assignment", which is entirely true.

      If the page programmer does not want to re-POST old form data then she avoids window.location.reload() because IE and FF both present the user with the (often confusing) dialog about resending the form (or retrying) if you use instead window.location.reload().

      What do you think about allowing this specific assignment when the JSLint "browser" option is set?

      Tom
    Your message has been successfully submitted and would be delivered to recipients shortly.