what http status?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arty
    New Member
    • Nov 2008
    • 35

    what http status?

    i am trying to find out if it's viable to use a http status when the page has been requested but the readystate times out indifinately at 1 so if this happen i could update a div showing a consequent message like "your request has timeout please try again" just like on a classic html environment you get:

    "The connection to the server was reset while the page was loading.,The site could be temporarily unavailable or too busy. Try again in a few
    moments. etc.."

    so what http status should be used for this?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You just need to check the readyState of the http object. The status will only be available when the request is complete. Choose a number of seconds which you think appropriate and check the readyState. If it's still not complete, abort the request and display the message.

    Comment

    • arty
      New Member
      • Nov 2008
      • 35

      #3
      thank you, i 'll try this out

      Comment

      • arty
        New Member
        • Nov 2008
        • 35

        #4
        btw do you know what http status equals to this:
        "The connection to the server was reset while the page was loading.,The site could be temporarily unavailable or too busy. Try again in a few
        moments. etc.."

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          HTTP 1.1 status codes according to RFC 2616

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            Are you using Ajax?
            I could be wrong here but...I thought that ReadyState only works with Ajax calls.

            Comment

            Working...