In this case your script will be available on all pages which use custom master page. As you probably know in Sharepoint there are master pages:
- Custom master page – used for regular publishing pages, e.g. for public site view, including default.aspx. It is stored in SPWeb.CustomMasterUrl property;
- System master page – used for system pages (e.g. application layout pages) and list views. Stored in SPWeb.MasterUrl.
With this approach it won’t be needed to add script reference to any master page (neither custom nor system), and script will be available on all pages (public and system).