Reloading a webpage

Discussion in 'Mac Programming' started by Mikel30, Mar 28, 2011.

  1. Mikel30 macrumors member

    Jan 11, 2004
    I'm trying to write an Applescript, but I'm not quire sure how to do it. Basically, there's a web page that I want to keep checking on. It's not live yet, and I want to find out when it's up.

    The tricky part is that the webpage redirects if it isn't up yet, so I can't simply reload the page. I want the Applescript to go to the webpage, check to see if it got redirected somewhere else, and if so, load it again. So I need to check to see what page it's currently at, and that's what I can't figure out.
  2. balamw, Mar 28, 2011
    Last edited: Mar 28, 2011

    balamw Moderator


    Staff Member

    Aug 16, 2005
    New England
    IIRC curl ( won't follow redirects unless you tell it to. It also seems like you can ask it to output how many redirects it was asked to follow in case it does.

    EDIT: I just checked this on a site I have registered, but not yet set up hosting for. curl gives no output, while curl -L gives me the Network Solutions "Coming Soon" page.


Share This Page