url中的scheme

iPhone上URL Schemes的作用为应用程序提供了一个其他应用程序或者safari可以启动他的方法.

  --http://blog.sina.com.cn/s/blog_5673c12f0100qd6i.html

iPhone / iOS SDK 最酷的特性之一就是应用将其自身”绑定”到一个自定义 URL scheme 上,该 scheme 用于从浏览器或其他应用中启动本应用。

  --http://objcio.com/blog/2014/05/21/the-complete-tutorial-on-ios-slash-iphone-custom-url-schemes/

URL

http://en.wikipedia.org/wiki/Uniform_resource_locator

Syntax

Main article: URI scheme § Generic syntax

Every HTTP URL consists of the following, in the given order. Several schemes other than HTTP also share this general format, with some variation.

  • the scheme name (commonly called protocol, although not every URL scheme is a protocol, e.g. mailto is not a protocol)
  • a colon, two slashes,[9][8]
  • a host, normally given as a domain name[10] For example, http://www.example.com/path/to/name would have been written http:com/example/www/path/to/name[7] but sometimes as a literal IP address
  • optionally a colon followed by a port number
  • the full path of the resource

The scheme says how to connect, the host specifies where to connect, and the remainder specifies what to ask for.

For programs such as Common Gateway Interface (CGI) scripts, this is followed by a query string,[11][12] and an optional fragment identifier.[13]

The syntax is:

scheme://[user:[email protected]]domain:port/path?query_string#fragment_id

Component details:

  • The scheme, which in many cases is the name of a protocol (but not always), defines how the resource will be obtained. Examples include httphttpsftpfile and many others. Although schemes are case-insensitive, the canonical form is lowercase.
  • The domain name or literal numeric IP address gives the destination location for the URL. A literal numeric IPv6 address may be given, but must be enclosed in [ ] e.g.[db8:0cec::99:123a].
    The domain google.com, or its numeric IP address 173.194.34.5, is the address of Google‘s website.
  • The domain name portion of a URL is not case sensitive since DNS ignores case:
    http://en.example.org/ and HTTP://EN.EXAMPLE.ORG/ both open the same page.
  • The port number, given in decimal, is optional; if omitted, the default for the scheme is used.
    For example, http://vnc.example.com:5800 connects to port 5800 of vnc.example.com, which may be appropriate for a VNC remote control session. If the port number is omitted for an http: URL, the browser will connect on port 80, the default HTTP port. The default port for an https: request is 443.
  • The path is used to specify and perhaps find the resource requested. This path may or may not describe folders on the file system in the web server. It may be very different from the arrangement of folders on the web server. It is case-sensitive,[14] though it may be treated as case-insensitive by some servers, especially those based on Microsoft Windows.
    If the server is case sensitive and http://en.example.org/wiki/URL is correct, then http://en.example.org/WIKI/URL or http://en.example.org/wiki/url will display an HTTP 404 error page, unless these URLs point to valid resources themselves.
  • The query string contains data to be passed to software running on the server. It may contain name/value pairs separated by ampersands, for example
    ?first_name=John&last_name=Doe.
  • The fragment identifier, if present, specifies a part or a position within the overall resource or document.
    When used with HTML, it usually specifies a section or location within the page, and used in combination with Anchor elements or the "id" attribute of an element, the browser is scrolled to display that part of the page.

The scheme name defines the namespace, purpose, and the syntax of the remaining part of the URL. Software will try to process a URL according to its scheme and context. For example, a web browser will usually dereference the URL http://example.org:80 by performing an HTTP request to the host at example.org, using port number 80.

Other examples of scheme names include httpsgopherwaisftp. URLs with https as a scheme (such as https://example.com/) require that requests and responses will be made over a secure connection to the website. Some schemes that require authentication allow a username, and perhaps a password too, to be embedded in the URL, for exampleftp://[email protected]. Passwords embedded in this way are not conducive to security, but the full possible syntax is

scheme://username:[email protected]:port/path?query_string#fragment_id

Other schemes do not follow the HTTP pattern. For example, the mailto scheme only uses valid email addresses. When clicked on in an application, the URLmailto:[email protected] may start an e-mail composer with the address [email protected] in the To field. The tel scheme is even more different; it uses the public switched telephone network for addressing, instead of domain names representing Internet hosts.

时间: 2024-08-30 10:41:27

url中的scheme的相关文章

网址URL中特殊字符转义编码

网址URL中特殊字符转义编码 字符    -    URL编码值 空格    -    %20 "          -    %22 #         -    %23 %        -    %25 &         -    %26 (          -    %28 )          -    %29 +         -    %2B ,          -    %2C /          -    %2F :          -    %3A ;  

POST对URL中末尾斜杠的差异

在调试一个接口,php的,文件名是index.php,放在目录/checkmail/下. 访问时的url写的是/checkmail,调用时用的是JQuery的post方法. 开始发现,被调用时检查传入的参数没有传过来. 跟踪了传过来的所有参数,发现$_SERVER['REQUEST_METHOD']得到是GET. 明明是POST调用的,为什么得到的是GET呢? 先百度了一下,没找到答案. 于是各种尝试,最后在调用的url中,把反斜杠/加上,发现参数得到了. 也就是说,/checkmail 和 /

javascript获取当前url中的参数

javascript获取当前页面url中的参数可以使用location的search方法,获取到的是url中?后面的部分,例如http:localhost:8080/Manager/index.jsp?id=1 使用location的search方法可以获取到字符串?id=1;想要获取?后面的键值对可以使用substring方法对其进行截取,截取后获得id=1;需要获得id的值,可以使用split()方法对其进行拆分,拆分表达式为"=".下面看具体例子: window.onload =

nginx去掉url中的index.php

使用情境:我想输入www.abc.com/a/1后,跳转到www.abc.com/index.php/a/1 配置Nginx.conf在你的虚拟主机下添加:  location / {      if (!-e $request_filename){           rewrite ^/(.*)$ /index.php/$1 last;      } } 如果你的项目入口文件在一个子目录内,则: location /目录/ {      if (!-e $request_filename){

三个获取浏览器URL中参数值的方法

这三个是一般的获取浏览器传的参数值的方法,之前有用unescape()解码的方法,但是遇到汉字会产生乱码,所以用decodeURI(); 方法一: function getQueryString(name) { //获取url方法 编辑传来的参数 //之前decodeURI是用的unescape() 有时候会取汉字乱码 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r

如何从浏览器的url中获取参数信息

浏览器宿主环境中,有一个location对象,同时这个对象也是window对象和document对象的属性. location对象中提供了与当前窗口加载的文档有关的信息,即url信息. 如:https://www.baidu.com/api/sousu?search=baidu&id=123#2 location.href:完整的url location.protocol:返回协议(https) location.host:返回服务器名称和端口号(www.baidu.com) location.

js、jquery获取当前url中各个参数

首先,先把获取各参数的方式再写一遍,相信大家都耳熟能详,就写几个常用的吧. 以此网址https://i.cnblogs.com/EditPosts.aspx?opt=1为例: 1. var url=window.location.href console.log(url)-->https://i.cnblogs.com/EditPosts.aspx?opt=1 获取完整url,包含所有参数. 2. var url=window.location.search console.log(url)--

如何获取url中的参数并传递给iframe中的报表

在使用报表软件时,用户系统左边一般有目录树,点击报表节点就会在右侧网页的iframe中显示出报表,同时点击的时候也会传递一些参数给网页,比如时间和用户信息等.如何使网页中的报表能够获取到传递过来的参数呢?以下用报表软件FineReport简单介绍一些. 具体实现过程 将报表生成页面时,给网页添加onload事件,首先获取url中的参数,然后嫁接到iframe的src上,或者通过获得的参数拼接处完整的报表url赋给iframe的src. <html> <head> <title

ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php

去掉 URL 中的 index.php ThinkPHP 作为 PHP 框架,是单一入口的,那么其原始的 URL 便不是那么友好.但 ThinkPHP 提供了各种机制来定制需要的 URL 格式,配合 Apache .htaccess 文件,更是可以定制出人性化的更利于 SEO 的 URL 地址来. .htaccess文件是 Apache 服务器中的一个配置文件,它负责相关目录下的网页配置.我们可以利用 .htaccess 文件的 Rewrite 规则来隐藏掉 ThinkPHP URL 中的 in