From:Talk like a Googler: parts of a url

Let’s dissect the parts of a URL (uniform resource locator). I’ll tell you how we typically refer to different parts of a URL at Google. Here’s a valid URL which has lots of components:

http://video.google.co.uk:80/videoplay?docid=-7246927612831078230&hl=en#00h02m30s

Here are some of the components of the url:

  • The protocol is http. Other protocols include https, ftp, etc.
  • The host or hostname is video.google.co.uk.
  • The subdomain is video.
  • The domain name is google.co.uk.
  • The top-level domain or TLD is uk. The uk domain is also referred to as a country-code top-level domain or ccTLD. For google.com, the TLD would be com.
  • The second-level domain (SLD) is co.uk.
  • The port is 80, which is the default port for web servers. Other ports are possible; a web server can listen on port 8000, for example. When the port is 80, most people leave out the port.
  • The path is /videoplay. Path typically refers to a file or location on the web server, e.g. /directory/file.html
  • This URL has parameters. The name of one parameter is docid and the value of that parameter is -7246927612831078230. URLs can have lots parameters. Parameters start with a question mark (?) and are separated with an ampersand (&).
  • See the “#00h02m30s”? That’s called a fragment or a named anchor. The Googlers I’ve talked to are split right down the middle on which way to refer it. Disputes on what to call it can be settled with arm wrestling, dance-offs, or drinking contests.  Typically the fragment is used to refer to an internal section within a web document. In this case, the named anchor means “skip to 2 minutes and 30 seconds into the video.” I think right now Google standardizes urls by removing any fragments from the url.

What is a static url vs. a dynamic url? Technically, we consider a static url to be a document that can be returned by a webserver without the webserver doing any computation. A dynamic url is a document that requires the webserver to do some computation before returning the web document.

Some people simplify static vs. dynamic urls to an easier question: “Does the url have a question mark?” If the url has a question mark, it’s usually considered dynamic; no question mark in the url often implies a static url. That’s not a hard and fast rule though. For example, urls that look static like http://news.google.com/ may require some computation by the web server. Most people just refer to urls as static or dynamic based on whether it has a question mark though.

转载于:https://www.cnblogs.com/cnsealine/p/3456173.html

Parts of a URL相关推荐

  1. python爬虫基础扫盲之urllib.pase解析URL

    在笨方法"学习python笔记之urlopen,中提了urllib主要是提供打开网页,解析url等功能用于网络爬虫,其lib主要包含四个部分,其中urllib.parse主要是负责url的解 ...

  2. 单机斗地主单机_单击浏览器中的URL会发生什么

    单机斗地主单机 In this article, I want my readers to get a picture of a very basic concept of the web world ...

  3. 恶意url_预测URL的恶意

    恶意url In this article, we walk through developing a simple feature set representation for identifyin ...

  4. using werkzeug to build a shorly url app

    werkzeug构建'url shortly'应用 0: basic wsgi 1: creating the folders 2: the base structure 3: 环境 4: routi ...

  5. 高级Android开发面试汇总

    高级 Android 开发面试题汇总 一. Android 基础 1. Service 的两种启动方式 简单的来说就是 直接启动 和 绑定启动 两种方式. // 直接启动 Context.startS ...

  6. Coursera课程Python for everyone:Quiz: Networks and Sockets

    Networks and Sockets 10 试题 1. What do we call it when a browser uses the HTTP protocol to load a fil ...

  7. Werkzeug教程

    http://chaoxz2005.blog.163.com/blog/static/15036542012863405266/ http://www.dajo.com.cn/a/boke/pytho ...

  8. Hive中实现有序,有序concat拼接,有序集合,hive方法操作命令,与自带方法列表

    前言 记得以前用过这个函数,这次开发怎么都找不到了,不常用的原因,也是笔记没做好 方法一 GROUP_CONCAT(distinct id ORDER BY id DESC SEPARATOR '_' ...

  9. 巧妙解决AJAX跨域问题

    2019独角兽企业重金招聘Python工程师标准>>> <?php/** * ajax proxy * ajax跨域解决办法 * @author suconghou <s ...

  10. Werkzeug Turorial

    Werkzeug不是一个framework,而是一个library,用来开发application和framework 一个WSGI的application像这样: def application(e ...

最新文章

  1. linux cp 强制覆盖_Linux基本操作教程
  2. 加速度随机游走_IMU Noise Model
  3. 续说零拷贝(Zero-Copy) - DMA技术
  4. 数据库主键设计之思考(转)
  5. 简单的ftp服务器(客户端、服务器端、socket)
  6. 双指针--Codeforces Round #645 (Div. 2) d题
  7. linux搭建spark集群,详解Spark+Zookeeper搭建高可用Spark集群
  8. ORACLE行转列通用过程(转)
  9. C#的正确版本号是多少?
  10. 递归法:整数划分问题(怎么进行划分呢)
  11. [转贴]ASP.NET下对远程SQL SERVER数据库的备份和恢复的存储过程
  12. 为什么说传统分布式事务不再适用于微服务架构?
  13. matlab高等数学实验答案,高等数学实验matlab参考完整答案.doc
  14. linux编程:pthread
  15. C#会员管理系统源码 会员消费管理系统源码
  16. 宝塔面板服务器ip地址修改_宝塔,云帮手服务器控制面板,你用的哪一款?
  17. 如何混淆JavaWeb代码
  18. 中台干货!百度/小米/滴滴/京东,中台架构实践大比拼!
  19. 服务器一堆pymp文件夹无法删除的解决方法
  20. c语言数据结构及算法实现代码,数据结构算法实现及解析―配合严蔚敏_吴伟民编著的数据结构(C语言版和C++版)(作者 高一凡)源代码...

热门文章

  1. 依赖注入框架(DI Framework)
  2. Spring 框架蕴含的设计思想
  3. 并行算法:如何利用并行处理提高算法的执行效率?
  4. java File类入门学习
  5. 【Linux】scp IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
  6. Asp.Net Core Mvc上Json序列化首字母大小写的问题
  7. 通过rsync备份静态文件
  8. IoC容器9——基于注解的容器配置
  9. SD-WAN(软件定义WAN)
  10. centos linux服务器优化之系统服务优化