title: Sharing common code across pages with Browserify
body: <p>I have a fairly large multi-page javascript applications that uses requirejs to organize code. I am researching moving to browserify because I like the simplicity that it offers and I am already used to the node.js module system.</p>
  
  <p>Currently on each page I have javascript that goes like this</p>
  
  <pre><code>&lt;script data-main="/scripts/config/common" src="/scripts/lib/require.js"&gt;
  &lt;script data-main="/scripts/config/page-specific-js" src="/scripts/lib/require.js"&gt;
  </code></pre>
  
  <p>and I have a common build step and a build for each page. This way the majority of the JS is cached for every page.</p>
  
  <p>Is it possible to do something similar with browserify? Is caching like this even worth it, or is it better to bundle everything into one file across all pages (considering that maybe only one page can depend on a large external library)?</p>