title: Is there a way to export a page with CSS/images/etc using relative paths?
body: <p>I work on a very large enterprise web application - and I created a prototype HTML page that is very simple - it is just a list of CSS and JS includes with very little markup. However, it contains a total of 57 CSS includes and 271 javascript includes (crazy right??)</p>
  
  <p>In production these CSS/JS files will be minified and combined in various ways, but for dev purposes I am not going to bother.</p>
  
  <p>The HTML is being served by a simple apache HTTP server and I am hitting it with a URL like this: <code>http://localhost/demo.html</code> and I share this link to others but you must be behind the firewall to access it.</p>
  
  <p>I would like to package up this one HTML file with all referenced JS and CSS files into a ZIP file and share this with others so that all one would need to do is unzip and directly open the HTML file.</p>
  
  <p>I have 2 problems:</p>
  
  <ul>
  <li>The CSS files reference images using URLs like this <code>url(/path/to/image.png)</code> which are not relative, so if you unzip and view the HTML these links will be broken</li>
  <li>There are literally thousands of other JS/CSS files/images that are also in these same folders that the demo doesn't use, so just zipping up the entire folder will result in a very bloated zip file</li>
  </ul>
  
  <p>Anyway -</p>
  
  <p>I create these types of demos on a regular basis, is there some easy way to create a ZIP that will:</p>
  
  <ol>
  <li>Have updated CSS files that use relative URLs instead</li>
  <li>Only include the JS/CSS that this html references, plus only those images which the specific CSS files reference as well</li>
  </ol>
  
  <p>If I could do this without a bunch of manual work, if it could be automatic somehow, that would be so awesome!</p>
  
  <p>As an example, one CSS file might have the following path and file name.</p>
  
  <p><code>/ui/demoapp/css/theme.css</code></p>
  
  <p>In this CSS file you'll find many image references like this one:</p>
  
  <p><code>url(/ui/common/img/background.png)</code></p>
  
  <p>I believe for this to work the relative image path should look like this:</p>
  
  <p><code>url(../../common/img/background.png)</code></p>