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

  • Home
  • SEARCH
  • 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 8216323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:05:20+00:00 2026-06-07T12:05:20+00:00

I have a pretty large single page application that’s about 800K. About 500K is

  • 0

I have a pretty large single page application that’s about 800K. About 500K is data that’s sent to the client. I’m considering moving some of my elements that are just json strings in the head in the <script> tag.

When the browser traverses the DOM, does it also look in the <head> tag (in which case there would be no benefit) of does traversing occur only inside the <body> tag?

  • 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-06-07T12:05:22+00:00Added an answer on June 7, 2026 at 12:05 pm

    When using document.querySelectorAll("some selector example"), elements in the head are also considered. This can easily be solved by using:

    document.body.querySelectorAll("...")
    

    The same applies to getElementsByTagName, getElementsByClassName, querySelector, etc.
    But not to getElementById, since an id must be unique within a document, so limiting the context wouldn’t make sense.

    Text is also a node type, by the way. <script> ...500kb... </script> generates the following DOM tree:

    SCRIPT
        #text
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that is pretty memory hungry. It holds a large amount
I have a pretty large tree data structure that will get updated (nodes removed
I have a pretty large site and every page is built from several included
I have a pretty big web application that I created last year using ASP.NET
I'm looking at building a Rails application which will have some pretty large tables
I might have pretty basic question about regex. I have the following regex, which
I have a pretty typical bookmarklet code that's working perfectly for me in all
I have a pretty standard database sitting on SQL Server. To manage the data
This a VERY open question. Basically, I have a computing application that launches test
I have noticed that, from Google Maps page, you can get an embed link

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.