Cross-domain:
1. JSONP (Jsonp is the principle of dynamically inserting script tags) 2. Document.domain + iframe 3. Window.name, Window.postmessage 4. Set Agent page on server
Performance optimization:
1. Reduce the number of HTTP requests: CSS sprites, JS, CSS source code compression, picture size control appropriate; web Gzip,cdn hosting, data caching, Image server 2. The front-end template JS + data, reduce the bandwidth wasted due to HTML tags, the front-end with variables to save the AJAX request results, each operation of local variables, no request, reduce the number of requests 3. Use InnerHTML instead of DOM operations to reduce DOM operations and optimize JavaScript performance 4. Set ClassName instead of directly manipulating style 5 when you need to set a lot of styles. Less global variables, cached DOM node lookup results. Reduced IO read Operation 6. Avoid using CSS Expression (CSS expressions), also known as dynamic Properties 7. Picture preload, put the style sheet at the top, put the script at the bottom, plus the timestamp
HTTP status codes have those. What does the distinction mean?
1.100-199 is used to specify some action 2 that the client should correspond to. 200-299 is used to indicate that the request succeeded 3. 300-399 is used for files that have been moved and is often included in the locator header information to specify the new address information 4. 400-499 is used to indicate client error 400: Semantics is incorrect, the current request cannot be understood by the server 401: The current request requires user authentication 403: The server has understood the request, but refused to execute it 5. 500-599 is used to support server error 503: Service not available to get a string of Unicode encoding var dectohex = function (str) {
var res=[];
for (Var i=0;i < str.length;i++)
res[i]= ("+str.charcodeat" (i). toString). Slice (-4);
Return "\\u" +res.join ("\\u");
}
var hextodec = function (str) {
Str=str.replace (/\\/g, "%");
return unescape (str);
}
var str=dectohex ("Dectohex Unicode Encoding Conversion");
Console.log ("Encoded after:" +str+ "\ n \ nthe decoding:" +hextodec (str));