When designing the interaction for websites and using javascript it is always important to make sure it degrades gracefully. That said, how many people cannot see content because they lack javascript. When working 开发者_运维问答with ajax calls, you create pages people can be taken to when they don't have js. The practice is to default to those pages, and I'm not talking about such heresy as not doing that anymore. However with some projects there is too much time involved in having this perform as well as can be. So before I plan to do a vary simple solution for non-ajaxians, I'd like to know some statistics of how many people I'm "leaving behind".
I haven't been able to find any concrete numbers.
Not many. A few paranoids, a few bots, a few cell phones, a few folks who refuse to abandon lynx (I am one, so I should know). The problem with JS is that you cannot control the environment on the client's machine. Top-heavy programming on the server is fine; just increase RAM, disk space, split resources among servers, load balance, etc. On the client, you need to be careful that you are not crowding out low-end machines with over-powered scripts.
The numbers I see working on a very large, globally visited web site is ~8% of users cannot execute any kind of JavaScript for one reason or another. Around 4-6% more (12-14% total) can execute some JS but are very limited - some mobile devices, for example.
I don't think there is any global rule, it is really going to depend on your app and your audience.
For a web site as opposed to web "application", degrading into non-js views is relatively straight forward (albeit providing a clumsier user experience.
However, many applications straight-up simply require JavaScript - there are some use cases that cannot be done without JS in any reasonably useful way.
Accessibility is a big issue though. However, making a site accessible also often has a knock-on effect in making the site SEO friendly.
for me, ajax is useful when you what to error trap some fields to get concrete value, a disadvantage is, people can see your code through js pages. which is not proper if you are a programmer.
精彩评论