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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:18:47+00:00 2026-05-26T12:18:47+00:00

My javascript foo is a bit weak, is it possible to use javascript to

  • 0

My javascript foo is a bit weak, is it possible to use javascript to scrape the page its on into a string? I don’t want it to make another request for the webpage, I need it to read in itself and any other source sitting on the page which will include a unique token generated for each page request, hence the need for it to read in all data on that instance of the page.

It also needs to be everything on that page, including comments as I would like to create a md5 hash from it, is this possible at all?

The html that needs to be scraped is that representing the DOM after the page initially completes loading.

  • 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-26T12:18:48+00:00Added an answer on May 26, 2026 at 12:18 pm

    Be careful with this. With javascript, you have access to all the objects of the page and you can fetch the HTML for the entire page. But, the HTML you fetch with javascript may or may not be the exact same HTML that came from the original page download. Some browsers (like older versions of IE) don’t actually store the original HTML so when you ask for the innerHTML, they manufacture HTML from the objects on the page. When they do that, attributes may be in different order, quoting may be different, even capitalization of attribute names may be different.

    So, if you really need an md5 hash of the original HTML page and need it to be accurate, you will have to request it again from the server (it will probably end up coming from the browser cache) and calculate your own md5 hash of what you download from that – you can’t use innerHTML of the current document.

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

Sidebar

Related Questions

Hi I have a problem with a javascript string var foo = \<a href=javascript(foo('a','b'))>test</a>\
I have this line in a javascript block in a page: res = foo('<%=
I want to define a JavaScript class, Foo. Foo = function(value){ this.value = value;
I have a div on page, which content will change by javascript, I want
Possible Duplicates: 'this' keyword, not clear this operator in javascript function foo() { if(this
I'm trying to use a pattern like this in a javascript regexp: foo.bar.match(/foo\.(buz|bar)/) but
Possible Duplicate: Difference between using var and not using var in JavaScript var foo
Given the following javascript: function foo(selectControl) { ... } and the following html: <select
In my javascript I have this loopDeLoop: while (foo !== bar) { switch (fubar)
In javascript I have an array as follows: var foo = [2, 2, 4,

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.