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 189453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:10:26+00:00 2026-05-11T16:10:26+00:00

I know document.write is considered bad practice; and I’m hoping to compile a list

  • 0

I know document.write is considered bad practice; and I’m hoping to compile a list of reasons to submit to a 3rd party vendor as to why they shouldn’t use document.write in implementations of their analytics code.

Please include your reason for claiming document.write as a bad practice below.

  • 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-11T16:10:26+00:00Added an answer on May 11, 2026 at 4:10 pm

    A few of the more serious problems:

    • document.write (henceforth DW) does not work in XHTML

    • DW does not directly modify the DOM, preventing further manipulation (trying to find evidence of this, but it’s at best situational)

    • DW executed after the page has finished loading will overwrite the page, or write a new page, or not work

    • DW executes where encountered: it cannot inject at a given node point

    • DW is effectively writing serialised text which is not the way the DOM works conceptually, and is an easy way to create bugs (.innerHTML has the same problem)

    Far better to use the safe and DOM friendly DOM manipulation methods

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

Sidebar

Related Questions

I'm new to JavaScript and programming in general (although I know some people don't
I'm writing a script that needs to write the current page location to the
I want to write a script which adds in a string a backslash ()
I don't know whether I should be here or not. But I'm trying to
I know it's maybe an fairly easy basic knowledge for you, here I need
I know the title sounds easy but I am looking for an example that
I don't know if it works or not, but I am concluding this because
I know this subjet isn't new at all but i'm going to be crazy
I know this seems like I should have immediately found the one example out
This question I have asked before and just got answer that there is an

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.