0

I am looking to display a progress bar for the first part of the an ordinary non-ajax browser request, when the browser is waiting for a response from the server. On my drupal sites, I have found this waiting time can be several seconds depending on the conditions. I have been messing with pace.js (http://github.hubspot.com/pace/docs/welcome/) and it loads and behaves nicely once the response is received and the content is loading.

Is this a viable thing to do? Or will it be a dead end because ultimately the browser knows not what it is waiting for...

Waiting for response

Michael Paler
  • 215
  • 1
  • 8
  • Yes, you answered it yourself. I would consider loading the result in an iFrame that is hidden until loaded. – mplungjan Aug 10 '14 at 04:37

1 Answers1

0

If you know it's at least a few seconds, you can create the illusion of it knowing how long it will take. Add an animation set to show a progressbar for four seconds. Upon your ajax data arriving, remove the graphic. This way, the user doesn't think nothing is happening.

oknate
  • 1,068
  • 10
  • 14