Forum Moderators: open

Message Too Old, No Replies

waiting message.

         

zozzen

3:43 am on Feb 21, 2008 (gmt 0)

10+ Year Member



Hi, when users come to my site to search data, they often have to wait at least 5 seconds (because of php running) and i'll like to show them a small meter for waiting. After the page is loaded, the meter disappears and the result will be shown.

I know Ajax can do this, but some browsers don't support it. As the waiting meter is a very minor function to my website, it seems to be unwise for me to have a meter but block some users away from my site.

Do you know any other non-ajax method that can do the same function?
And in case there's no alternative, is there any way to deal with a non-ajax support browser? Thanks a lot for all hints and advice.

eelixduppy

7:57 pm on Feb 27, 2008 (gmt 0)



You want to use ajax to make things faster and more usable however your applications should not rely on them. At any given time, if javascript were to be disabled your site should still have some functionality to it and still be usable to your viewers. To get around javascript-disabled browsers in general you can use the <noscript> tag. I personally don't use this tag. Instead the content that I want to show is non-javascript related and for those special features that I'll have, you either have them disabled and they just aren't available, or if it is absolutely necessary to have javascript/ajax then you have to explicitly say that somewhere and bring them somewhere else.

As for taking 5 seconds to search it seems to be a little bit longer than it should. If you are using a database, which I'd imagine that you are, then you should really look into optimizing the db for optimal performance to reduce that time for as little as possible. If you are transversing through the filesystem, something that takes a decent amount of time, then maybe you should reconsider your search algorithm. Maybe implementing "deep search" and "quick search" features would be a nice way to quicken the pace for those looking for popular information.