1. For more information about responsive web design, see frontend observation.
A ). webpage Design and Development should be adjusted based on user behaviors and devices. The page can automatically switch resolution, image size, and corresponding scripts, that is, a website can be compatible with multiple terminals.
B). It is related to the mobile Internet. It is flourishing with the popularization and enrichment of mobile terminals.
C). Technologies designed: Media query, fluid grid, and flex box
D). Optimization Scheme: HTML5 local storage, mobile device priority, Fluid image, and css3 Image
2. Talking about the modular features
A) scalability and non-dip type;
B) reuse is required;
C) implement collaborative page completion by multiple people to improve development efficiency and reduce maintenance difficulty;
D) If a function module or a module with strong coupling needs to be reused, You can encapsulate the code to implement modularization.
3. Event Delegation
Disadvantage: performance problems exist. If Nesting is deep, layer-by-layer bubbling is required, which will cause performance problems.
4. Talk about node. js
Is a javascript operating platform,
5. Talk about less. js
CSS preprocessing
6. cross-browser domcontentloaded event
Solution: 1. it is divided into IE and non-ie, so it needs to be checked for features; 2. the domcontentloaded event can be used for non-ie solutions. 3. for non-ie, you need to start from two aspects: first, simulate domcontentloaded through readystatechange; second, considering that IFRAME affects the trigger of readystatechange, you need to use doscroll to simulate it.
The following is the code:
<HTML xmlns = "http://www.w3.org/1999/xhtml">
7. Reverse Proxy
A proxy server exists between the browser and the Web server to send a request. After domain name resolution, the IP address of the proxy service is obtained, and then the proxy server distributes and parses the HTTP request, this protects the final web server.
8. process after URL input
1. First, resolve the domain name and obtain the Server IP Address: browser cache, system cache, router cache, recursive search, and so on;
2. Establish a connection and want the server to send an HTTP request;
3. The server parses and responds to the HTTP request;
4. The Browsing System parses the response results;
5. There may be redirection, JS, CSS, Ajax requests, embedded images, etc., and the above process will be repeated.
9. Page traffic
....
10. js single-threaded Problem
var a = 6;setTimeout(function () { alert(a); a = 666;}, 1000);a = 66;
View code
11. Ajax solution to cross-origin problems
1. jsonp: dynamically create a script tag locally, point SRC to the Cross-origin segment, call the callback function on the Cross-origin end, and pass JSON data as parameters to the callback function to complete the callback.
2. server Proxy: establishes an intermediate layer between the local domain and the Cross-Domain segment to complete communication. The intermediate layer can be JSP, Servlet, PHP, etc., located in the local domain, cross-origin problems can be easily implemented on the server side.
3. IFRAME: insert an IFRAME tag in the local domain to point the SRC to a proxy page in the Cross-Domain segment, and request the proxy page for Ajax requests to solve communication problems. Reference
4. Flash, IMG, and HTML5 can also solve cross-domain problems.
12. How to convert a string to JSON
Method: 1. High Version browser var JSON = JSON. parse (STR); 2. Early method: var JSON = eval ('+ STR + ')'); 3. var JSON = (new function ('Return '+ Str) () for function analysis, refer to w3school and zhiyuxuan.