Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Dynamically change preload script

Is there a way to set/change the preload option in webPreferences after BrowserWindow has been created?

What I would like to do is make a webcrawler that changes its preload script whenever the BrowserWindow redirects to a new URL.

The issue that I am trying to solve is that the webcrawler needs to collect different information on different sites.

The only 2 solutions I can think of are:

  1. make 1 massive preload script that covers every website or
  2. create a new BrowserWindow with a different preload script each time it redirects,

but neither seems resource efficient.

Is it possible to change or use different preload scripts without using multiple instances of the BrowserWindow?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

no, preload script is tied to per-process browserwindow creation, not per-url navigation inside of browserwindow.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!