AJAX progress bar dispaying loading progress percentage for page load

倾然丶 夕夏残阳落幕 提交于 2019-11-30 09:35:32

问题


How do you use a progressbar to show the loading percentage for a page? ...(similar to how they show in flash)

Thanks


回答1:


Impossible(on IE8 & FF3 & Opera without plugin or extension). If you want real loading percentage include HTML + Javascript + Stylesheet + Image. you can only detect how many file loaded to page(only Image & javascript can be detected by this technique).




回答2:


I would say that if you need a progressbar for a page, that page might need some rethinking.

Personally I don't like pages that have progress bars (Like the one in the ASUS Download Area). They are just annoying. My browser already have a progressbar. And I would like my bandwidth to be used to download the page and not graphics that would just tell me that I am still waiting for the page.

When it comes to AJAX requests ON a page though, I would just use a spinner thing of some sort. To tell the user that something is going on and that the page is not dead. And again, if the background request takes so long that you would need a progressbar, I would again say that the background request should maybe be rethought.




回答3:


oh that so easy, you copy down my code and paste on your website, however is not very cool, but still can use.

CODE : <SCRIPT LANGUAGE='JavaScript' SRC='http://www.seabreezecomputers.com/tips/progress.js' TYPE='text/javascript'> </SCRIPT>

REMEMBER THIS CODE IS PASTE BETWEEN "/Head" and "BODY"

  [1]: http://dw6-vista-tdx.blogspot.com



回答4:


Hey, check out the upload progress dialog at s3fm, a free online Amazon s3 file manager.



来源:https://stackoverflow.com/questions/796792/ajax-progress-bar-dispaying-loading-progress-percentage-for-page-load

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!