Lenix

Introduction to CSS ::file-selector-button pseudo-element: modify the input style of file type

1. Background For a long time, the file-type <input> file selection box has a very critical problem, that is, the default style of the browser is too ugly and cannot be customized. The real-time effect is as follows: If you want to take into account both function and vision, the usual practice is to hide

Introduction to CSS ::file-selector-button pseudo-element: modify the input style of file type Read More »

html5 stop sharing screen event

stream.getVideoTracks()[0].addEventListener(‘ended’, () => { errorMsg(‘The user has ended sharing the screen’); }); Register for the above event first. This event is fired when the “Stop Sharing” button is clicked. … The post html5 stop sharing screen event first appeared on Lenix Blog . This article is reprinted from https://blog.p2hp.com/archives/9762 This site is for inclusion only,

html5 stop sharing screen event Read More »

Solve the problem that nginx gzip does not take effect on html pages

gzip_types adds text/html types: as follows: gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/html text/css application/ json application/ javascript text/xml application/xml application/xml+rss text/ javascript ; … The post to solve the problem that nginx gzip does not work for html pages first appeared on Lenix Blog .

Solve the problem that nginx gzip does not take effect on html pages Read More »

HTTP/2 does not support the chunked transfer encoding mechanism Transfer-Encoding:chunked of HTTP 1.1

HTTP/2 does not support HTTP 1.1’s chunked transfer encoding mechanism Transfer-Encoding:chunked, because it provides its own, more efficient data streaming mechanism … The post HTTP/2 does not support HTTP 1.1’s chunked transfer-encoding mechanism Transfer-Encoding: chunked first appeared on Lenix Blog . This article is reprinted from https://blog.p2hp.com/archives/9745 This site is for inclusion only, and the

HTTP/2 does not support the chunked transfer encoding mechanism Transfer-Encoding:chunked of HTTP 1.1 Read More »

Connection-specific header fields such as Connection and Keep-Alive are prohibited in HTTP/2 and HTTP/3.

Connection-specific header fields such as Connection and Keep-Alive are prohibited in HTTP/2 and HTTP/3. Browsers and Firefox ignore them in HTTP/2 responses, but Safari is HTTP/2 compliant and will not load any responses that include them. … The post HTTP/2 and HTTP/3 Suppress connection-specific header fields like Connection and Keep-Alive. first appeared on Lenix Blog

Connection-specific header fields such as Connection and Keep-Alive are prohibited in HTTP/2 and HTTP/3. Read More »

Solve the problem of nginx etag and last-modified header disappearing

sub_filter_last_modified on; //When replacing page content with sub_filter module, solve the problem that etag and last-modified header disappear … The post解决nginx etag和last-modified头消失问题first appeared on Lenix Blog . 本文转自https://blog.p2hp.com/archives/9740 This site is for inclusion only, and the copyright belongs to the original author.

Solve the problem of nginx etag and last-modified header disappearing Read More »

Six Rules for Writing Clean Code

Let’s look at some suggestions on how to prevent the spaghetti code phenomenon by minimizing the visibility of variables . Our goal is to minimize the part of the code where the variable is visible in the source code, i.e. reduce the scope of the variable . Scope minimization is a process of structuring code,

Six Rules for Writing Clean Code Read More »

Solve the problem of Chrome browser translation not working

Due to Google Translate’s withdrawal from China, the translation feature of Google Chrome is also currently unavailable, according to the technology blog TechCrunch, a Google spokesperson told TechCrunch via email that the company has stopped China due to “low usage”. Mainland’s Google Translate service. The change also affects the built-in translation feature of Google Chrome,

Solve the problem of Chrome browser translation not working Read More »