全 Ajax 站点的优点和缺点?

发布于 2024-09-19 17:39:42 字数 1431 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

幸福丶如此 2024-09-26 17:39:42

IMO,这不是“坏”或“好”。这完全取决于网站是否满足要求。通常,在仅使用 AJAX 的网站上工作的开发人员往往会忽略整个负面 SEO 影响问题。但是,如果该网站的开发是为了支持渐进增强(或根据您的观点进行优雅降级)(听起来您已经做到了),那么您就可以了。唯一需要准备的事情是 AJAX 调用无法按预期完成的情况(确保您正在处理超时、断开的链接等),这样用户就不会被困在加载图标上。 (实际上,您在任何应用程序中都必须处理这种事情。)

有很多单页网站使用大量 JS 和 AJAX 作为 UI,它们都很棒。具体来说,我知道有一些针对网页设计师和网页应用程序开发团队的作品集网站使用了这种方法。通常,该应用程序感觉有点像 Flash 应用程序,但不需要特殊的插件。

IMO, this isn't "bad" or "good". That depends completely on whether or not the website fulfills the requirements. Oftentimes, developers working on AJAX-only sites tend to miss the whole negative SEO impact issue. However, if the site is developed to support progressive enhancement (or graceful degradation depending on your point of view), which it sounds like you have, then you're good. Only things to prepare for are times when the AJAX call can't complete as expected (make sure you're dealing with timeouts, broken links, etc) so the user doesn't get stuck staring at a loading icon. (The kind of stuff you'd have to deal with in any application, really.)

There are plenty of single-page websites out there using heavy JS and AJAX for the UI and they are great. Specifically, I know of portfolio sites for web designers and web app development teams that use this approach. Oftentimes, the app feels a bit like a flash app, but without the need for a special plugin.

断肠人 2024-09-26 17:39:42

“这是一种糟糕的网页设计方法吗?如果是的话,为什么?”

当然不是。事实上,使网页的行为更像桌面应用程序,同时保持对所有用户的功能,是网页设计的圣杯。

"Is this a bad method of web design? If so, why?"

Certainly not. In fact, making web-pages behave more like desktop applications, whilst remaining functional to ALL users, is the holy-grail of web-design.

維他命╮ 2024-09-26 17:39:42

我说,只要您考虑所有用户,即移动/纯文本/低带宽/小屏幕尺寸,那么您就会没事。太多的开发者只是为了他们巨大的 19 英寸屏幕和 10Mbps 的速度而这样做,用户几乎不会因为自己的过错而落后。

I say, as long as you consider ALL your users, i.e. mobile/text-only/low bandwidth/small screensizes then you will be fine. Too many developers just do it for their huge 19" screens and 10Mbps, that users to get left behind through almost no fault of their own.

雨落星ぅ辰 2024-09-26 17:39:42

这取决于用户,恕

我直言,这与用户体验密切相关,尽管它当然是编程解决方案的主题。

在提出这个问题 12 年后,全 AJAX 通常被称为“管理状态”。

根据我的经验:

  • 为 API 插件创建平台
  • 为不同目的创建两个我自己的 CMS Web 应用程序
  • 为不同目的管理许多不同的 WordPress.org 站点
  • 管理我自己的用于执行这些调用的 PHP-AJAX 和 Node.js 的云服务器

。 ..这取决于什么对用户来说最有效。

考虑以下场景:

  1. 用户是否会整天点击此网站或至少一个小时来调整许多不同的选项和
    输入?
  2. 或者许多用户会短暂访问以执行少数快速任务?

状态管理/全 AJAX 迄今为止最适合场景 1,以 Facebook 和 Gmail 为例。

对于场景 2(例如博客),整页加载效率更高,尤其是直接从搜索结果链接的页面。这可能适用于像亚马逊这样的网络商店,用户在谷歌上搜索一两种产品,然后离开。

从哲学上讲,我听说差异在于用户数量和流量,但我不太同意。更多的是关于主要目标用户将进行多少次点击和

发送。

It depends on the user

This relates closely to UX, IMHO, though of course it's on-topic for programming solutions.

All-AJAX is often called "managing state" 12 years after this Question was asked.

From my experience in:

  • Creating a platform for API plugins
  • Creating two of my own CMS web apps for different purposes
  • Managing many different WordPress.org sites for different purposes
  • Managing my own cloud servers for both PHP-AJAX and Node.js doing these calls

...it depends on what is most efficient for users.

Consider these scenarios:

  1. Will users be clicking around this website all day long or for at least an hour adjusting many different options and <form> inputs?
  2. Or will many users visit briefly to perform just a handful of quick tasks?

State-managed / all-AJAX is by far best for scenario 1, with Facebook and Gmail as prime examples.

Whole-page loads are more efficient for scenario 2, like blogs, especially with pages linked directly from search results. That might apply to webstores like Amazon, maybe, where users search Google to find one or two products, then leave.

Philosophically, I've heard that the difference is about the number of users and traffic, but I don't quite agree. It's more about how much clicking and <form> sending the primary target user will be doing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文