How does Feed.ly determine iFrame load progress?

孤者浪人 提交于 2019-12-04 11:05:42

If you couldn't get an actual bytesLoaded and bytesTotal, you could track how long it takes all users to load that iframe and come up with an average loading speed that you then use to govern the progress bar. If you wanted it to be even more accurate, you could track how the current user's loading speeds match up to the average loading speeds on every item they preview (or maybe per feed) and develop an even better approximation based on that user's relative times.

The first few people would just be guesswork but after that, you might be able to get relatively close. Naturally, that approach is going to work better when you have a large number of users, like feedly does. For a smaller site or more niche RSS feeds, it would be less useful.

Edit: I don't think they're actually doing that though. At least, I don't see them making any tracking requests. I think they're probably just faking it. After previewing a lot of items, sometimes the bar is only half way full when it disappears and sometimes it fills in completely before you see more than a white screen. I think it's a placebo.

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