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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:21:39+00:00 2026-06-07T11:21:39+00:00

I already have a Javascript file (performing some functions), that will be appended to

  • 0

I already have a Javascript file (performing some functions), that will be appended to a webpage. Now I want the Javascript to collect the entire webpage along with its html tags, images, external Javascript files and external css files. I don’t want to use Jquery/any other external library here.

My motive is to get the entire webpage, save it, and display it as similar as the original one.

Is this possible with Javascript?

Any help will be greatly appreciated.

  • 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-07T11:21:41+00:00Added an answer on June 7, 2026 at 11:21 am

    Short Answer – No

    No, it’s not possible with JavaScript, especially the “saving” part, as JavaScript doesn’t have file access rights in browser environments (which we assume here), except when developing browser extensions or when explicitly modifying your browser’s security properties to allow this.


    Long Answer – If You Reall Must: The Long and Winding Road…

    Loading the Right Content

    First you need to figure out whether you want to fetch the page in its static status (as it is sent by the server on the first page load), or in its currently rendered status (after it’s been rendered in the browser, and that scripts have executed and may have added content to the page).

    Loading Resources

    Then you’ll need to iterate over all the elements of the DOM, and fetch all external resources (including the ones referenced in CSS files).

    You’ll probably want to have all resources fetch using HTML or plain-text mime-types in your requests, as otherwise your browser might trigger visible downloads with end-user popups, and not at all perform your transparent downloads.

    Updating all references

    Next you need to figure out how you’d want to organize your “downloaded” content, and where to put the resources and how to name them to avoid conflicts.

    Once done, you need to iterate over all the DOM elements again and update the references to use the paths of your local resources instead of your local resources.

    Writing Content to Disk

    Now the last bit is to save all these resources to disk, using either your browser’s custom APIs or the HTML5 File System APIs.

    • Exploring the HTML5 FileSystem APIs
    • Basic Concepts about the FileSystem API

    Here Be Dragons

    None of this guarantees that you’ll achieve what you want, as some pages could still contain code that won’t behave nicely once downloaded like this. There may be code requesting content from remote URLs or assuming some directory structures and endpoints, or using resource names that you may have modified, etc… (that would be strange, but is not that uncommon).

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

Sidebar

Related Questions

i have a object in javascript and some already defined functions. but how can
Basically I want get data I already have accessed from javascript and passing it
We already have the database with real data inside. Now we want to build
I already have an enterprise Java EE application. I want expose some of the
I have an external javascript file that relies on the presence of another file.
I have some settings I need in a Javascript file -- servers to connect
i have a function like this in my external javascript file (jQuery is already
I already have a form with normal HTTP post. Now, I want to rewrite
I already have code which lazy loads scripts on request. My issue now is
I have used 3 some jquery related files namely <script type=text/javascript src=/blog/jquery/jquery-1.7.1.min.js></script> <link type=text/css

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.