Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript mobile redirecting with jQuery. (location.href || location.replace)?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38340
    JohnMotylJr
    Participant

    Howdy css-tricks forum folks.

    Can anyone inform me the advantages or personal preferences when using either window.location.href or window.location.replace?

    My Code:

    if($(window).width() < 600) // Lazy Mobile redirection
    {
    window.location.replace("m.contact.html");
    // window.location.href = "m.contact.html";
    }
    #103987
    JohnMotylJr
    Participant

    @kgscrott284, thanks. I did some research and at least for what im trying to accomplish its either (POE-tae-toe) or (POE-ta-tow)… im going to stick with replace. Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.