How to have AJAX trigger the browser's loading indicator

前端 未结 6 1981
臣服心动
臣服心动 2020-12-05 06:54

I\'m making an ajax-enabled lab scheduling program, and some of the ajax operations aren\'t exactly quick.

In Gmail, when you go to your inbox, send a message, etc.

6条回答
  •  生来不讨喜
    2020-12-05 07:18

    Many users don't even understand or notice the browser's native loading indicators. If it is really a long running load the best user experience would be to indicate it as part of your web application. Remember context is king and this is an opportunity to communicate to your user what is going on and what functionality is still available.

    If your entire user interface becomes invalid at the time of the request an overlay with a loading indicator is appropriate. A slightly opaque overlay communicates to the user without a disruptive break in vision.

    If you simply need to show the request has started and is working, a spinner next to the button that started the request is best. On success, the spinner can be replaced with a green check mark or other common indicator that fades out after a short period.

    These are common patterns found in many of google's applications.

提交回复
热议问题