渐进增强/优雅降级和 Web 应用程序
我正在构建一个使用大量 JavaScript 的 Web 应用程序。现在我想知道让应用程序在没有 Javascript 的情况下运行是否有意义?我可以理解,对于普通网站,您希望确保每个人都可以使用它,但是您能对复杂的 Web 应用程序说同样的话吗?
我检查了一些大型网络应用程序,似乎有些可以,有些则不能。例如,GMail 有一个无需 Javascript 即可运行的基本版本。
如果你查看 Google 文档,如果没有 Javascript,它根本无法工作。没有 Javascript 创建像 GDocs 这样的应用程序很可能是不可能的。
这是一个很好的标准吗:如果不可能回退到非 Javascript 工作应用程序,你就不会这样做吗?
I am building a web application that uses a lot of Javascript. Now I am wondering does it make sense to make the application work without Javascript? I can understand for normal websites that you want to make sure everybody can use it but can you say the same of complex web applications?
I checked out some big web apps and it seems some do it and some don't. For example GMail has a basic version that works without Javascript.
If you look at Google Docs it doesn't work at all without Javascript. Creating an app like GDocs without Javascript is most likely not possible.
Is that a good standard to go by: if it's impossible to fall back to a non-Javascript working applicaiton you don't do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这实际上取决于您的项目是什么以及您的目标受众是谁。
对于网站/页面而不是应用程序的项目,应该有一个禁用 JS 浏览的选项,但如果仅在只读模式下也没关系。这个站点(SO)就是这种方法的一个例子。
对于应用程序且涉及非常复杂的 UI 组成和依赖项的项目,可能没有其他选择。例如,如果没有 JavaScript,ASP.NET 项目就无法运行,但考虑到它带来的强大抽象功能,通常没有人会抱怨。
It really depends on what is your project about and who is your target audience.
For projects that are rather sites/pages than applications, there should be an option to browse through with JS disabled, but it's okay if only in read-only mode. This very site (SO) is an example of that approach.
For projects that are rather applications and involve very complex UI composition and dependencies, there is probably no other alternative. For instance, ASP.NET projects won't work without JavaScript but nobody would usually complain given the powerful abstraction it brings to play.