|
Post by account_disabled on Nov 25, 2023 5:21:26 GMT
缩短是万维网上的一项技术,其中统一资源定位符 (URL) 的长度可以大大缩短,但仍直接指向所需页面。TinyURL 主页包含一个用于提交长 URL 以进行缩短的表单。这是通过在短域名上使用 HTTP 重定向来实现的,该域名链接到具有长 URL 的网页。URL 缩短器对于 Twitter 和某些即时消息服务来说更方便,因为消息可以携带的字符数有限制。URL 提供对主地址的封装。URL 缩短别名被认为是有用的,因为它们更容易写下、记住或传递,编写时不易出错,并且也适合空间有限的地方,例如 IRC 频道主题、电子邮件签名、微博、某 些印刷报纸(例如 .net 杂志甚至 Nature),以及在特定长度的消息上强制换行的电子邮件客户端。 在 URL 缩短中,每个长 URL 都与一个唯一的密钥相关联。并非所有协议都能够被缩短,尽管诸如 http、https、ftp、ftps、mailto、mms、gopher、dict 和 dns 等协议正在通过 URL Shortener 等服务进行处理。TinyURL 有一个可下载的浏览器工具栏。此外,TinyURL 还提 C级联系人列表 供了一个 API,允许应用程序自动创建短 URL。这是通过简单地读取 API 应用程序返回的结果来完成的。TinyURL 并不是唯一的 URL 缩短器,但可能是最古老且最著名的。 使用 URL 重定向有多种原因。互联网服务提供商为其客户提供的免费托管空间可能会产生不美观的地址。许多 Web 开发人员使用 URL 中的唤起功能来表示数据层次结构、命令结构、操作路径或会话信息。这可能会导致数百个字符长的 URL,其中包含复杂的字符模式。此类 URL 非常难以记住 并且不容易手动复制。因此,这些复杂的 URL 大多是为了可靠性而复制和粘贴的,因为它们很难记住。因此,短 URL 对于网站或硬拷贝出版物(例如印刷杂志或书籍)可能更方便,后者通常需要将很长的字符串分成多行(就像某些电子邮件软件或互联网的情况一样)论坛)或被截断。 在一些即时通讯网站上,甚至在 Twitter 上,消息或推文占用的字符数都有限制。URL 缩短器可以轻松解决这个问题。一些缩短服务,TinyURL 可以生成人类可读的 URL,尽管生成的字符串比长度优化服务生成的字符串更长。最后,免费 URL 重定向网站提供有关链接收到的点击次数的详细信息,这比设置同样强大的服务器端分析引擎更简单。免费url重定向还缩短了QR码,减少了QR码的图形面积并降低了密度以改善扫描,在TinyURL的帮助下将URL编码为QR码。
|
|