Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to download a websites entire code, HTML, CSS and JavaScript files? [closed]

Is it possible to fully download a website or view all of its code? Like for example I know you can view page source in a browser but is there a way to download all of a websites code like HTML, CSS and JavaScript then run it on my own server or change it up and run that?

like image 713
Ryan Brienza Avatar asked Sep 01 '16 02:09

Ryan Brienza


2 Answers

Hit Ctrl+S and save it as an HTML file (not MHTML). Then, in the <head> tag, add a <base href="http://downloaded_site's_address.com"> tag. For this webpage, for example, it would be <base href="http://stackoverflow.com">.

This makes sure that all relative links point back to where they're supposed to instead of to the folder you saved the HTML file in, so all of the resources (CSS, images, JavaScript, etc.) load correctly instead of leaving you with just HTML. See MDN for more details on the <base> tag.

like image 54
Michael Kolber Avatar answered Sep 23 '22 12:09

Michael Kolber


You can use HTTrack tools to grab all website content and all the entire image, css, html, javascript.

You can download HTTrack here

like image 35
Muhammad Ibnuh Avatar answered Sep 24 '22 12:09

Muhammad Ibnuh