为什么不直接使用 ajax for Page Requests 来加载页面内容?

2023-10-12php开发问题
1

本文介绍了为什么不直接使用 ajax for Page Requests 来加载页面内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

许多网页加载其所有内容以更改很少的信息.

Many web pages load all of their content to change very little information.

现在我想知道为什么开发人员不应该只对主页请求使用ajax?

Now I would like to know why shouldn't the developers just use ajax for the main page requests?

在我自己的网页上,我想仅使用 ajax 来开发我网页上的主要请求,但我不知道这种方法有什么具体的缺点.

On my own webpage, I would like to develop the main requests on my webpage with just ajax but I don't know any specific cons with this approach.

有没有人知道为什么有人不应该如此频繁地使用 ajax?

Does anybody have an idea why someone shouldn't use ajax so much?

推荐答案

搜索引擎、爬虫/蜘蛛、没有 javascript 的浏览器、屏幕阅读器和其他内容消费者不会很满意.

Search engines, crawlers/spiders, browsers with no javascript, screen readers and other consumers of the content will not be very happy with it.

如果您已经支持完整内容的标准服务器端导航,则可以在网站顶部提供大量 ajax 行为.看看 渐进增强 (SO) 和 渐进增强 (wiki).

You can provide tons of ajax behavior on top of you website if you already support standard server side navigation for the full content. Have a look at progressive enhancement (SO) and progressive enhancement (wiki).

这篇关于为什么不直接使用 ajax for Page Requests 来加载页面内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

PHP实现DeepL翻译API调用
DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以...
2025-08-20 php开发问题
168

PHP通过phpspreadsheet导入Excel日期数据处理方法
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的...
2024-10-23 php开发问题
287

mediatemple - 无法使用 codeigniter 发送电子邮件
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)...
2024-08-23 php开发问题
11

Laravel Gmail 配置错误
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)...
2024-08-23 php开发问题
16

将 PHPMailer 用于 SMTP 的问题
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)...
2024-08-23 php开发问题
4

关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)...
2024-08-23 php开发问题
17