Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6580417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:01:37+00:00 2026-05-25T16:01:37+00:00

I have a few questions about web workers Does the worker have access to

  • 0

I have a few questions about web workers

  • Does the worker have access to storage? E.g. indexedDB/webSQL and local storage of the file the worker was initiated from?

  • How can i include a file in a worker? I have a functions.js which has alot of quick app related functions and it really wont make sense to copy paste the file’s contents in a worker only to have two different places up update my functions.

  • Can I have a DOM inside a worker? like load an audio file in a temp audio tag to read its duration and if it is playable or not. Not access dom of parent page, but have a DOM in the worker itself.

  • If the answers to any of the question is negative then how can/should it be done manually?

This is for a chrome app so I have access to the latest Chrome APIs and I don’t need to care about backward compatibility.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:01:38+00:00Added an answer on May 25, 2026 at 4:01 pm

    There is no DOM access of any kind from a web worker – period. ALL DOM manipulation must be done from the main JS thread. Web Workers can only communicate with the main thread via messaging.

    This previous SO question tells you that web workers cannot access local storage, something that was easily found with a Google search.

    That same thread has a list of what web workers can access.

    It is unclear what you mean by “include a file in a worker”. You can import scripts. I don’t know what else you’re asking about. You can use an ajax call to fetch data if that will help you with your audio file.

    This sounds to me like you need to do some basic research about what you can and can’t do with web workers (as there is a TON written about it on the web) and then come back with a lot more specific questions that incorporate that knowledge.

    There are no hacks for web workers that let you do more than you are supposed to be able to do.

    You can do work in the main JS thread and do it in little chunks with setTimeout if you have a lot of work to do and want to keep the main UI as responsive as possible. This is a very old design pattern that goes back to the days before threading was available or easy to use. It involves designing your work such that it can be done in little pieces with state stored in some persistent object and then you can repeatedly do small amounts of work and then return back, only to pick up the next piece of work on the next timer tick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a few questions about data synchronization. The architecture does not seem to
i have a few questions about flash web sites. are their pages done using
I have a few specific questions about web services (SOAP over HTTP): A client
I have a few questions about Xcode and interaction with GCC 4.2.1: It doesn't
I have a few questions about this after reading the iPhone documentation on it:
I have a few questions about cross-page posting in ASP.NET: What is cross-page posting
I have a few questions about Core Location. 1) Should the user refuse permission
I have a few quick questions about the Microsoft Detours Library. I have used
I've been hearing about triggers, and I have a few questions. What are triggers?
There have been several questions over the past few days about the proper use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.