Common methods of front-end optimization

Reduce http requests Avoid multiple requests for small resources. You can combine multiple resources into one resource, such as js, because sending network requests is time-consumingcss is placed at the head and js is placed at the bottom of the body It helps to render the page faster. css will block the execution of js, because js will be exec ...

Added by Scropion on Mon, 24 Jan 2022 06:05:05 +0200

How to write markdown it plug-in

prefacestay A blog with VuePress + Github Pages In, we used VuePress to build a blog. The final effect is as follows: TypeScript Chinese document. In the process of building a blog, out of practical needs, we VuePress blog Optimization: extended Markdown syntax How to write a markdown it plug-in is explained in Analysis of markdown it principle ...

Added by nonaguy on Mon, 24 Jan 2022 04:35:02 +0200

js basic problems

JS 1.this pointing problem this points to a deeper understanding of the address (1) Function call, this points to its caller function foo() { console.log(this.bar); } var bar = "bar1"; var o2 = {bar: "bar2", foo: foo}; var o3 = {bar: "bar3", foo: foo}; foo(); // bar1 o2.foo(); // bar2 foo.call(o3); // bar3 (2 ...

Added by Txtlocal on Mon, 24 Jan 2022 01:31:36 +0200

Deep understanding of Vue bidirectional data binding

** MVVM ** The two-way data binding of Vue refers to the two-way binding of model (model, that is, the data in Vue instance) and view (view), that is, one will change and the other will change. First, let's understand what MVVM (model view viewmodel) is. In the MVVM architecture, the concept of ViewModel is introduced. ViewModel is equivalen ...

Added by clarencek on Mon, 24 Jan 2022 00:15:49 +0200

Methods of manipulating arrays in Js

The latest front-end interview question in 2021 (operation method of array in Js) preface Tip: how to count arrays in JS This paper aims at the problems of operating array related methods in the process of front-end interview I don't know if there are any friends who often confuse the methods of operating arrays like me, or are not very ...

Added by jayjay960 on Sun, 23 Jan 2022 23:26:15 +0200

[Python crawler advanced learning] - JS reverse hundred examples - nested layer by layer, RSA encryption in an accelerated mall

  statement All contents in this article are for learning and communication only. Sensitive websites and data interfaces have been desensitized. It is strictly prohibited to use them for commercial and illegal purposes. Otherwise, all consequences arising therefrom have nothing to do with the author. If there is infringement, please contact ...

Added by jmanfffreak on Sun, 23 Jan 2022 17:46:59 +0200

JavaScript learning notes

1, Array 1.1 concept of array An array is a collection of data, each of which is called an element. Any type of element can be stored in the array. Arrays are an elegant way to store a set of data under a single variable name. 1.2 creating arrays 1. Create an array with new var array name = new Array(); var arr  =  new&nbsp ...

Added by bigrossco on Sun, 23 Jan 2022 17:25:27 +0200

vue2.0 source code analysis, initevent (component event initialization)

Using events in vue // Example 1: // parent receive this.$on('test', function (msg) { console.log(msg) // hi }) // children outgoing this.$emit('test', 'hi') // Example 2: // The parent component listens to the outgoing events of the child component <my-component v-hook:created="dosomething"></my-component> // Example 3: // ...

Added by JCBarry on Sun, 23 Jan 2022 16:12:31 +0200

On the points needing attention in this binding

preface: This is a keyword in JavaScript. It is an object automatically generated inside the function body when the function runs. It can only be used inside the function body. In addition, this cannot be assigned during execution. Text: Default binding: Usually, in the case of separate or pure function calls, this points to the global ob ...

Added by Jaguar83 on Sun, 23 Jan 2022 05:57:39 +0200

JavaScript asynchronous programming and synchronous mode

JavaScript asynchronous programming The reason why javaScript adopts single thread: because javaScript is used to realize the dynamic interaction of pages, the core of interaction needs to operate dom. This situation determines that it must use single thread model, otherwise complex thread synchronization problems will occur; For example, i ...

Added by mfallon on Sun, 23 Jan 2022 02:35:44 +0200