I am using jquery ajaxError to catch all ajax errors. I am having a problem with the status code http 0 . This code is returned when the request fails (no network), or if the user refreshes the page (or clicks on another tab). I want to distinguish between both. Is there any way to do this?
I think there is no easy solution, but there is a workaround. In the status code http 0 you can check ...
if(navigator.onLine)
which will return if there is any network connected or not.
Source: https://habr.com/ru/post/1486182/More articles:Why binding is not enough to update the interface in WP7 (MVVM) - c #Symfony 2 Forms with Twig: Add a Form Variable to Existing Types - formsIncremental build aspnet_compiler - command-lineWhat values ββare valid for properties in graph databases (i.e. Titan, OrientDB, ArangoDB, Neo4J)? - neo4jWhy images and style files are not found on NanoHTTPD - androiderror loading file nanohttpd - javaavoid blocking the AVAudioPlayer headset in iOS - iphoneBash if instruction behavior - bashHow to get the physical path of referenced assemblies - c #Cakephp not working on Linux - joinAll Articles