asp.net 网页支持哪些客户端?
ASP.NET 网页支持哪些客户端?
我正在尝试记录一个 ASP.NET 网站,但我不确定就客户支持而言我应该说些什么。
就浏览器而言,asp.net 有限制吗?我使用过 IE 和 Firefox,它不能与其他一些浏览器(chrome 或 safari)一起使用吗?我应该说客户端仅限于任何特定操作系统(我希望它可以与 Mac 或 Linux 机器一起使用)吗?
What are supported clients for an asp.net web page?
I am trying to document an asp.net website and I am unsure what I should say as far as client support.
Are there limitations for asp.net as far as browsers? I have used IE and Firefox does it not work with some of the other browsers (chrome or safari)? Should I say the client is limited to any specific OS (I would expect it to work with a Mac or a Linux box)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
虽然您当然可以限制对 Web 客户端子集的“支持”,但您应该能够使其至少在或多或少的程度上适用于所有现代 Web 浏览器。这种差异实际上更多地与网络浏览器有关,而不是与网站有关。就动态行为而言,我建议使用已经解决了主要浏览器之间差异的 JavaScript 框架。 CSS 的问题更大,但您仍然应该能够近似相同的外观和感觉,尽管这可能需要一些工作。如果不知道您遇到的具体问题,就很难知道如何建议您解决这些问题。一般来说,我会针对 IE 8/7、FireFox 和 Safari(或 Chrome)进行测试。您可能也想加入 Opera,但我的经验是,如果您获得 FF,那么您通常已经可以为 Opera 工作了。
如果您无法让生成的 HTML 按照您希望的方式工作,您可能需要尝试使用 ASP.NET MVC。它使您可以更好地控制 HTML。这对于让事情按照您想要的方式工作非常有价值,不过,WebForms 代码显然也可以工作。但有时,您必须克服一些困难才能使其完全按照您想要的方式运行,因为 Web 控件的输出并不总是您和我在每种情况下都会产生的结果。
While you can certainly limit "support" for a subset of web clients, you ought to be able to make it work for, at least, all modern web browsers to a greater or lesser extent. The difference really has more to do with the web browser than the web site. As far as dynamic behavior, I'd suggest going with a javascript framework that already addresses differences between major browsers. CSS is more problematic, but you should still be able to approximate the same look and feel, though it may take some work. Without knowing what specific problems you're having it's hard to know how to suggest that you solve them. Generally, I would target and test IE 8/7, FireFox, and Safari (or Chrome). You might want to throw in Opera as well, though my experience has been that if you get FF, you generally have already gotten it to work for Opera.
If you are having trouble with getting the generated HTML to work the way you want it to, you might want to try using ASP.NET MVC. It gives you much more control over your HTML. This can be really valuable in making things work the way you want it, though, WebForms code can obviously be made to work as well. Sometimes, though, you have to jump through a few hoops to get it to behave exactly the way you want because the output of web controls isn't always what you and I would produce in every situation.
ASP.NET 中的任何内容本质上都不是特定于浏览器或客户端操作系统的。因此它几乎可以在任何平台上运行。
显然,大多数 ASP.NET 站点的正常运行都需要 JavaScript 支持。然而,作为开发人员,您可能会有意或无意地做很多事情,这可能会限制浏览器/平台的兼容性。最明显的是使用 active-x 控件。
Nothing in ASP.NET is inherently browser or client OS specific. So it should work on virtually any platform.
Obviously javascript support is nessessary for most ASP.NET sites to function correctly. However as the developer you can do many things both on purpose or by accident that may limit browser/platform compatibility. With the most obvious being using active-x controls.