How to gracefully check if Gravatar or a third-party website is working or not?

I just posted the question how-to-determine-why-the-browser-keeps-trying-to-load-a-page and found that my problem is with Gravatar.

I also noticed that StackOverflow is suffering from the same outage.

Does anyone know of an elegant way of determining whether Gravatar or some other third-party website has stood up , trying to extract avatar avatars from them?

This would eliminate the long page load and the endless download cursor ... I shouldn’t say it never ends ... it just takes a long time to leave and the user is very confused when they sit and wait ... for nothing .

+3
source share
2 answers

You may have another process that periodically checks the status of the site. Set a rule that does not suit you, for example, you can say: "ping time> 1500 ms = down." Ask this process to leave a note in the database table or configuration file. Then you check this value on each rendering page with virtually no cost.

, , .

- , localhost, ASP.NET, .

+3

Gravatar , . , , , , , .

+2

Source: https://habr.com/ru/post/1698863/


All Articles