prevent caching issue when connection state changes from online to offline