title: make homepage for all browsers
body: <p>I want a jquery code to set my current page as a home page for all browsers. I have tried this code but in vain</p>
  
  <pre><code>&lt;a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://dynamicdrive.com');"&gt;Click here to make Dynamic Drive your default homepage&lt;/a&gt;
  </code></pre>
  
  <p>as well as I tried also this</p>
  
  <pre><code>  function setHomepage() {
          if (document.all) {
              document.body.style.behavior = 'url(#default#homepage)';
              document.body.setHomePage('http://www.asp.net/130.aspx');
  
  
          }
          else if (window.sidebar) {
              if (window.netscape) {
                  try {
                      netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                  }
                  catch (e) {
                      alert("this action was aviod by your browser，if you want to enable，please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true");
                  }
              }
              var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
              prefs.setCharPref('browser.startup.homepage', 'http://www.asp.net/130.aspx');
          }
      }
  </code></pre>
  
  <p>These code snippets are available on internet but these threads are old. and according to this <a href="https://stackoverflow.com/questions/10751036/cross-browser-script-to-make-my-website-as-home-page">thread</a> its not possible. any one tried this recently?</p>