I have some browser CSS and animations on my web page, and I would like to determine if the user has a fast computer or not, so I can scale things accordingly to provide a better experience.
I am using the http://detectmobilebrowser.com script to detect all mobile devices, and I'm going to include the /android|ipad|ipod|playbook|silk/i.test(a) sentence to enable all tablet devices.
However, this is not so and cannot really address the actual equipment. Not quite far to paint a picture of what I'm looking for.
The iPhone 4S, for example, will be much more capable than many of the devices matching the detector of a mobile user agent, and this does not allow it to detach itself. Someone can run Google Chrome on a Pentium II computer (one way or another) and see my page. (This person probably doesn't have an iPhone 4S)
Obviously, in order to actually get an idea about this, I will need to do some actual performance testing, and, like when testing performance with any kind of application, it makes sense to only check the performance of the type of tasks it performs.
Even with this in mind, I feel that it would be difficult to get any reasonably accurate numbers before the performance testing procedure takes too long and the user becomes impatient. Therefore, this probably means going forward if I do not want the first initial impression to be perfect. Well, actually it is. Therefore, I canât get away with measuring the performance âafter the first runâ and adjust the parameters later.
So, what remains for me is to try to perform a similar task when loading the start page, so that it depends on the speed of rendering and processing the browser, not presenting anything to the user (so that they still think that the page is loading), and then preferably within seconds or two get accurate enough numbers to set parameters for a real page, to bring it to life and present in a pleasant manner that does not look like a slide show.
Perhaps I can place a full-page white <div> on top of my test case so that I canât see what is happening and hope that the browser is not smart, avoiding doing all the work.
Has anyone ever done this?
I know that people are going to say âyou probably don't need to do thisâ, or âthere should be a better wayâ or âreduce the number of effectsâ.
The reason I'm doing on the page is because it looks good. It's all. If I didnât care, there wouldnât be such a question. The goal is to give javascript the ability to define sufficient parameters to provide a terrific experience on a powerful computer, as well as tradable experience on a less efficient computer. When more energy is available, it should be used. Therefore, I hope this can explain why such proposals are not valid answers to the question.