1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Disable the AJAX loading .gif for most default actions

Discussion in 'XenForo Suggestions' started by Chris D, Oct 25, 2013.

  1. Chris D

    Chris D XenForo Developer Staff Member

    The animated .gif loads for almost all AJAX actions even those that are usually nearly instant such as liking a post or launching an overlay.

    My suggestion is to either disable that completely for some smaller actions or add some code that only shows the loading gif after X seconds have passed.
    mjda, HWS, Adam Howard and 4 others like this.
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Personally, I think a delayed loading image is bad UI.
  3. Digital Doctor

    Digital Doctor Well-Known Member

    What are all the "AJAX actions" ?
    I think I like lots of them.
  4. Digital Doctor

    Digital Doctor Well-Known Member

    Do you mean this thing ?


    like when I tried to watch this thread.

    (Took me 5 times to screencapture it).

    On my slow Xenforo site ... I see that AJAX loading thing alot.
    Here ... only for a brief second.
  5. Chris D

    Chris D XenForo Developer Staff Member

    I don't necessarily disagree with this.

    My preference would be for the image not to show up at all on most AJAX actions unless it is something expected to take a long time, such as validating and submitting a form or indeed something as intensive as a cache rebuild.
    Jeremy P and Adam Howard like this.
  6. AndyB

    AndyB Well-Known Member

    Hi Chris,

    Could you explain why you don't like the gif image showing AJAX actions in progress?
    Adam Howard likes this.
  7. Chris D

    Chris D XenForo Developer Staff Member

    The animation seems superfluous on actions that take a very small amount of time to complete anyway.
  8. Daniel Hood

    Daniel Hood Well-Known Member

    I like it appearing even on things such as a like. If it's a site that loads slow, that may take a second. Having a link that doesn't immediately do anything would make me think the site is dysfunctional. I realize that without that appearing, when I click like and it's done loading it changes to 'unlike' and shows a new div (the likes summary) but still, on a delay it could seem like it's broken.

    That said, it is pretty easy to disable, I think it's just a matter of including global: false in the arguments for the ajax request.
    Adam Howard and Amaury like this.
  9. AndyB

    AndyB Well-Known Member

    Unfortunately the time it takes to complete isn't a constant. Even very quick sites sometimes will be slow to do an action if something else is hogging the cpu.
  10. Chris D

    Chris D XenForo Developer Staff Member

    I am aware that isn't a constant.
  11. AndyB

    AndyB Well-Known Member

    A very good idea.
  12. Eagle

    Eagle Well-Known Member

    Well, in my opinion there is no need to disable the Ajax loading.gif at least, not so important that at some point.
  13. x_Stricken_x

    x_Stricken_x Active Member

    I personally like it showing up, even if for a split second. It makes it completely obvious that "Hey, this page is doing something via Ajax". It might just be me and the fact that 90% of the time when I'm on here I'm downloading something, so my Internet is slow and warnts the image being displayed.
    Adam Howard likes this.
  14. Liam W

    Liam W Well-Known Member

    Don't remove it.

    I complained to @digitalpoint for having it at the bottom of the page on his site...

    He then said he was planning to remove it and I said no.

    It is useful for people with slow internet connections - it may be quick for you, but maybe not for other's. Liking a post may take a few seconds for some people!

    As well as that, seeing it tells people something is waiting to happen - if they click a button and nothing appears/happens, they may think it is broken.

  15. x_Stricken_x

    x_Stricken_x Active Member

    Exactly my point. I'm not fortunate enough to have Fios, and my Internet is usually always tied up in updates - which means pages take about 2-6 seconds to load, the Ajax indicator lets me know my request is still processing.

    Not to mention the amount of people who do still have dialup or satellite Internet.
    Adam Howard and Liam W like this.

Share This Page