473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

what http status?

35
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?
Mar 7 '09 #1
5 1402
acoder
16,027 Expert Mod 8TB
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.
Mar 9 '09 #2
arty
35
thank you, i 'll try this out
Mar 12 '09 #3
arty
35
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.."
Mar 12 '09 #4
Dormilich
8,658 Expert Mod 8TB
HTTP 1.1 status codes according to RFC 2616
Mar 12 '09 #5
Frinavale
9,735 Expert Mod 8TB
Are you using Ajax?
I could be wrong here but...I thought that ReadyState only works with Ajax calls.
Mar 12 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Andrew | last post by:
Hi, friends, We need to programm a .dll (C#) which will collect all selected files from various locations, such as a DB, a file system, a VSS, etc. So, it may take long time. I created a method...
8
by: Bruno BAGUETTE | last post by:
Hello, I have to migrate a MySQL database to a PostgreSQL database without procedures. The problem is that this MySQL database uses ENUM, do you see what can I do to migrate ENUM into...
6
by: Nick Horrocks | last post by:
I have set up a custom error page for 404 errors. However the HTTP status code returned is 302 followed by 200, this causes search engines not to remove old pages from their index. How can I...
6
by: Andy Fish | last post by:
Hi, I've RTFM'd in vain for some named constants in the asp.net framework representing the HTTP error codes - the equivalent of Java's HttpServletResponse.SC_NOT_FOUND for 404 etc. All the...
0
by: DT | last post by:
I'm writing a .NET 1.1 client that invokes a method of a Web Service running on another organization's IIS 5 server. I need help understanding a fine point about HTTP, specifically in relation to...
2
by: inferno2000 | last post by:
Let's say if I want to send a http "Post" request to a url, and check the http status code later. How should I write the code? I have found example to use WinHttp to send "Get" request and check...
53
by: jaso | last post by:
Can you give any comments on this code? I used one goto, is it bad? #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <assert.h> #define NOT_NULL 1
4
by: _Raven | last post by:
Okay, I am playing with submitting forms with Ajax. I am trying to adapt this script to my forms: http://www.captain.at/howto-ajax-form-post-get.php I have included my code at the bottom of this...
89
by: Tubular Technician | last post by:
Hello, World! Reading this group for some time I came to the conclusion that people here are split into several fractions regarding size_t, including, but not limited to, * size_t is the...
167
by: darren | last post by:
Hi I have to write a multi-threaded program. I decided to take an OO approach to it. I had the idea to wrap up all of the thread functions in a mix-in class called Threadable. Then when an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.