Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

Is there a way to save a webpage as static HTML, available for offline viewing, editing etc.?

I want to remove all JavaScript files. Leave only HTML, CSS and images.

For example, if this web page has a Facebook Like button, I want the image of the button to be part of the HTML as a regular image (and not be loaded as some JavaScript code runs after I load the page).

I'm trying to prepare a webpage for an offline demo. When I use the standard "save as HTML complete" like tools, all the JavaScript is saved as well, and when viewed offline, all the dynamic content is blanks.

Note- I don't expect the dynamic content to work, of course, with no JavaScript. I just want the web page to LOOK as though it was just loaded from the interwebs.

share|improve this question
add comment

marked as duplicate by techie007, random Feb 12 at 2:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

I like Remy Sharp's inliner tool. What it does:

  • Get a list of all the assets required to drive the page: CSS, JavaScript, images and images used in CSS
  • Minify JavaScript (via uglify-js)
  • Strips white from CSS
  • Base64 encode images
  • Puts everything back together as a single HTML file with a simplfied doctype
share|improve this answer
add comment

(Answering my own question): I found a nice (if not perfect) solution: the Scrapbook browser Add-On. There is one for Firefox http://amb.vis.ne.jp/mozilla/scrapbook/ and one for Chrome. The one for Firefox looks more feature-complete.
I'm going to test it and see how it works.

share|improve this answer
    
Scrapbook was awesome! Did a great job. Here's a link to Mozilla's official Add-On page: addons.mozilla.org/en-US/firefox/addon/scrapbook –  Scott Rippey Apr 3 '13 at 17:26
add comment

i think you are in a dilemma. if you strip the javascript, sure the dynamic aeras will be blank, because the javascript would have filled them after the page loaded. you could try with different browsers, but i think you just can't have the cake and eat the cake.

as a workarounds i suggest:

make screenshots of the website and put them into a pdf, or view them with an imageviewer.

or get an internetconnection for the demo.

or have the whole website on a local webserver on your demo-hw.

share|improve this answer
    
+1 for the whole website on a local webserver –  Mark Mar 28 '12 at 11:08
    
I have no problem with hosting the entire website on my PC (that's what I intend to do!). The problem is all the snippets of javascript code that load widgets, ads, share-buttons etc. They don't need to work, but I want the page to LOOK as though they were loaded. The page needs to retain the basic HTML functionality (a text box is still a text box). –  Tal Weiss Mar 28 '12 at 13:12
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.