ARTICLE

Explorer Offline through AJAX

Posted by Ravikumar Raja Articles | ASP.NET AJAX in VB.NET August 28, 2006
Tags: AJAX
In Internet Explorer (and all other common web browsers) you have an menu item File -> Work off-line. What does this do with you web application? Of course, it is working offline, no communication possible to the web server. When connected with a dial-up connection it can happen that this is done automatically if you disconnect from your internet service provider.
 
Reader Level:

Work off-line with Ajax

In Internet Explorer (and all other common web browsers) you have an menu item File -> Work off-line. What does this do with you web application? Of course, it is working offline, no communication possible to the web server. When connected with a dial-up connection it can happen that this is done automatically if you disconnect from your internet service provider.

What does this mean to web developers?

Yes, you have to be sure your Ajax framework or requests are working correct with this mode. If your web browser is set to Work off-line you should display a message box that the current requests could not be processed due a connection problem, try again later.

With Ajax.NET Professional you will get an error message in your callbacks:

<script type="text/javascript">

function callback(res)

{

    if(res.error != null)

    {

            alert(res.error.Message);

            return;

    }

    // display return value...

}

</script>

Because Firefox and other web browsers currently not returning a correct error code for all scenarios you have to deal with the common error handling: try again or cancel request.

Try to visit your Ajax web application, wait until everything is loaded correctly, set the mode to Work off-line and try to invoke Ajax requests.

share this article :
post comment
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
Team Foundation Server Hosting
Become a Sponsor