Blog | 博客

Session operation of JS

On the PHP server side, there are concepts of Session and Cookie, and on the JS side, there are corresponding concepts of Session and Cookie. Cookie of JS, you can use cookie.js to complete the corresponding operation. For details, see the chapter Cookie.js realizes the operation of saving user name and password (4) . Use

Session operation of JS Read More »

js detects if the page is refreshed (performs the action after each refresh)

if (performance.navigation.type == 1) { alert( “This page is reloaded” ); } … The post js to detect if the page is refreshed (perform an action after each refresh) first appeared on Lenix Blog . This article is reprinted from https://blog.p2hp.com/archives/8917 This site is for inclusion only, and the copyright belongs to the original author.

js detects if the page is refreshed (performs the action after each refresh) Read More »

ES2022 New Features at a Glance

.at() method on built-in indexables RegExp Match Indices Object.hasOwn Error cause Top-level await Class field declarations Ergonomic brand checks for private fields .at() method on built-in indexables .at method on built-in indexables ? . const cart = [ ‘?’ , … The post ES2022 New Features at a Glance first appeared on Lenix Blog .

ES2022 New Features at a Glance Read More »

Chrome debugging WebSocket

var ws = new WebSocket(‘ws://localhost:9222/devtools/page/3c5c05fa-80b7-4cfe-8d1d-ebe79a7a5730’); ws.onopen= function() { ws.send(‘{“id”: 1, “method”: “Page.navigate”, “params”: {“url”: “https://www.fangdushi.com”}}’) }; ws.onmessage = function(evt) { console.log(‘Received a message from the server!’+evt.data); }; API documentation address https://chromedevtools.github.io/devtools-protocol/1-2 … The post Chrome debugging WebSocket first appeared on Lenix Blog . This article is reprinted from https://blog.p2hp.com/archives/8911 This site is for inclusion only,

Chrome debugging WebSocket Read More »

Summer vacation has started!

Original link: https://laozhang.org/archives/3162.html This year’s summer vacation has just begun, but it is destined to be a different summer vacation. The epidemic this year has been repeated, and the epidemic has basically stabilized across the country some time ago. In […] This article is reproduced from: https://laozhang.org/archives/3162.html This site is for inclusion only, and the

Summer vacation has started! Read More »