Use of prototype for single instance functions in JavaScript
<p>For performance optimization I'm using a single JavaScript file to handle all the pages of the website I'm working on.
The basic structure I'm using is as followed:</p>

<pre><code>(function($) {

    // Shared functions ...

    // A function for every page
    function Page1() {
    }
    Page1.prototype = {
        init: function() {
            //...
        },
        //more functions
    };

    // more pages

    $(document).ready(function() {
        if ($('#page1uniqueidentifier').length) {
            var page1 = new Page1();
            page1.init();
        }
        // more pages
    }
}) (jQuery);
</code></pre>

<p>I'm not an experienced JavaScript programmer so I've been searching a lot about best practices and different ways of structuring my code and I've ended up choosing this one but I'm not really sure about it and I have a few questions:</p>

<ol>
<li><p>Is it worth it to use prototype if I'm never gonna have more than a single instance of a page? I think I understand how prototype works and that I'm not gaining any performance there. But I'm using it just as a best practice because in the case different instances would exist, these functions would be the same in every instance.</p></li>
<li><p>Is there a better way to structure the code?</p></li>
<li><p>Should I put the call of the init function inside the constructor and then only call new Page1()?</p>

<pre><code>function Page1() {
    this.init();
}

if ($('#page1uniqueidentifier').length) {
    new Page1();
}
</code></pre></li>
</ol>
