Configuring Web Applications

本文介绍如何为iOS设备上的Web应用指定图标,包括为整个网站或单个网页设置图标的方法,以及如何为不同分辨率的设备提供多种图标尺寸。

【https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html】


Specifying a Webpage Icon for Web Clip

You may want users to be able to add your web application or webpage link to the Home screen. These links, represented by an icon, are called Web Clips. Follow these simple steps to specify an icon to represent your web application or webpage on iOS.

  • To specify an icon for the entire website (every page on the website), place an icon file in PNG format in the root document folder called apple-touch-icon.png

  • To specify an icon for a single webpage or replace the website icon with a webpage-specific icon, add a link element to the webpage, as in:

    <link rel="apple-touch-icon" href="/custom_icon.png">

    In the above example, replace custom_icon.png with your icon filename.

  • To specify multiple icons for different device resolutions—for example, support both iPhone and iPad devices—add a sizes attribute to each link element as follows:

    <link rel="apple-touch-icon" href="touch-icon-iphone.png">
    <link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad.png">
    <link rel="apple-touch-icon" sizes="180x180" href="touch-icon-iphone-retina.png">
    <link rel="apple-touch-icon" sizes="167x167" href="touch-icon-ipad-retina.png">

    The icon that is the most appropriate size for the device is used. See the “Graphics” chapter of iOS Human Interface Guidelines for current icon sizes and recommendations.

If there is no icon that matches the recommended size for the device, the smallest icon larger than the recommended size is used. If there are no icons larger than the recommended size, the largest icon is used.

If no icons are specified using a link element, the website root directory is searched for icons with the apple-touch-icon... prefix. For example, if the appropriate icon size for the device is 58 x 58, the system searches for filenames in the following order:

  1. apple-touch-icon-80x80.png

  2. apple-touch-icon.png

Note: Safari on iOS 7 doesn’t add effects to icons. Older versions of Safari will not add effects for icon files named with the -precomposed.png suffix. See First Steps: Identifying Your App in iTunes Connect for details.


### Glances Web Interface Usage and Configuration Glances is a cross-platform system monitoring tool written in Python that provides an overview of the entire system's health through its terminal-based user interface as well as via a web server mode. To use Glances' web functionality, it must be configured appropriately to allow remote access or local browsing. To start the Glances web interface, execute the following command: ```bash glances -w ``` This starts Glances in web server mode on port 61208 by default[^4]. Once started, users can navigate their browsers to `http://<server-ip>:61208` where `<server-ip>` represents either localhost (for accessing from the same machine) or the IP address of the remote host running Glances. For securing connections over networks with potential threats, enabling SSL/TLS encryption enhances security significantly. This involves specifying certificates during invocation like so: ```bash glances --ssl-cert /path/to/cert.pem --ssl-key /path/to/key.pem -B <bind-address> -P <port> ``` Here `-B` specifies binding address while `-P` sets up custom ports other than the standard one mentioned earlier[^5]. Additionally, client-server architecture support allows multiple clients connecting simultaneously without interfering each others’ sessions which makes managing large infrastructures easier when combined together alongside features such as exporting stats into files formats compatible third party applications for further analysis purposes too! #### Example Command Line Options For Configuring The Web Server Mode In GLANCES: ```bash # Start glances in web mode listening only locally at non-default port number. glances -b -p 71209 # Enable basic HTTP authentication requiring username 'admin', password provided interactively upon execution time. glances –A admin –password secretwordhere -W yes ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值