-
-
Save arantes555/4849273fe59b87313f0cb472ae65ae5b to your computer and use it in GitHub Desktop.
electron-net-cache-bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Empty --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {app, BrowserWindow} = require('electron') | |
const { net } = require('electron') | |
const testedUrl = 'https://thumbor.forbes.com/thumbor/651x436/https://blogs-images.forbes.com/davidbressan/files/2017/07/TORGERSON_2010_Arizona_Meteor_Crater.jpg?width=960' | |
app.whenReady().then(async () => { | |
const test = () => new Promise(resolve => { | |
const request = net.request(testedUrl) | |
request.on('response', (response) => { | |
console.log(`STATUS: ${response.statusCode}`) | |
console.log(`CONTENT_TYPE: ${response.headers['content-type']}`) | |
resolve() | |
}) | |
request.end() | |
}) | |
console.log('TEST 1:') | |
await test() | |
console.log('TEST 2:') | |
await test() | |
app.quit() | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "understood-truck-mix-s85q4", | |
"productName": "understood-truck-mix-s85q4", | |
"description": "My Electron application description", | |
"keywords": [], | |
"main": "./main.js", | |
"version": "1.0.0", | |
"author": "mehdi", | |
"scripts": { | |
"start": "electron ." | |
}, | |
"dependencies": {}, | |
"devDependencies": { | |
"electron": "13.1.7" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Empty */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment