Lenix

4 solutions for uploading monitoring data on the front end when the page is closed

Overview This article focuses on the solution of how to upload monitoring data to the server when the page instance is closed with the business scenario of “front-end monitoring and reporting data” . Among them, four schemes are involved, namely: Synchronous XMLHttpRequest img.src navigator.sendBeacon fetch keepalive Synchronous XMLHttpRequest const data = JSON . stringify ({

4 solutions for uploading monitoring data on the front end when the page is closed Read More »

Docker common notes summary

A common command to use docker version Check the docker version systemclt start docker start the container docker search image search docker images list images docker pull image name to get the image docker pull busybox:latest Get the latest image docker save busybox:latest -o busybox.tar Export image docker rmi busybox Delete the image docker load

Docker common notes summary Read More »

VS Code releases 1.70 version update

Microsoft released a new version of Visual Studio Code: vscode 1.70, updated content: Title Bar Customization Hides/shows the menu bar, command center, or layout controls. Fold selection to create your own fold area in the editor. Search multi-selection The search view supports multiple selections, which is convenient for operating on multiple search results. Tree View

VS Code releases 1.70 version update Read More »

he came! A new generation of JavaScript runtime that beats Node.js and Deno with performance!

Today I would like to introduce to you a latest open source javaScript runtime: Bun.js . It got 19.5k star in less than a month after open source! Looks like it’s going to be a big competitor to Deno Node .js ! Unlike the traditional javaScript runtime like traditional Node.js , Bun.js has built-in bundler,

he came! A new generation of JavaScript runtime that beats Node.js and Deno with performance! Read More »

Application of Beacon API – to call a request provided by the backend before the browser is closed

I encountered a requirement that a request provided by the backend should be called before the browser is closed. I used axios at first, and I swore that there was no problem. The backend later told me that no request was received. At this time, I I went to rule out the reason. I looked

Application of Beacon API – to call a request provided by the backend before the browser is closed Read More »

Removing browser web page restrictions and tricks that cannot be copied from the right-click menu

method one Usually press F12 directly. If this key is disabled, it can be opened by SHIFT + CTRL + I, or through the ” Developer Tools ” in the browser menu. Select the console, enter the following code and press Enter. // 开启文字选择document . onselectstart = function ( ) { return true ; }

Removing browser web page restrictions and tricks that cannot be copied from the right-click menu Read More »

iftop – monitor server real-time bandwidth

Introduce Linux’s tool for viewing bandwidth network card traffic: iftop The function of iftop: real-time traffic Reverse IP resolution Display port information install iftop yum install iftop -y Introduction of related parameters Identification Description “<=”/”=>”: direction of traffic “TX”: traffic sent by the network card (outbound direction) “RX”: Traffic received by the network card (inbound)

iftop – monitor server real-time bandwidth Read More »

js to make an element of the page full screen (such as video)

<video src=”a.mp4″ muted autoplay></video> <a onclick=”openFullscreen();”>full</a> <script> var elem = document.getElementsByTagName(“video”)[0]; function openFullscreen() { if (elem.requestFullscreen) { elem.requestFullscreen(); } else if (elem.mozRequestFullScreen) { /* Firefox */ elem.mozRequestFullScreen(); } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */ elem.webkitRequestFullscreen(); } … The post js method to make an element of a page fullscreen (such as

js to make an element of the page full screen (such as video) Read More »

Nginx modifies the default Content-Type value to solve the problem that the server file becomes downloaded when there is no extension

1. After Nginx is installed, the value of default_type is configured as application/octet-stream by default, and many domain names have been configured so far, rashly modifying such a global configuration may cause unusable problems 2. Files ending in html, placed in the root directory of the website will be recognized as text/html by default. 3.

Nginx modifies the default Content-Type value to solve the problem that the server file becomes downloaded when there is no extension Read More »