Provide an 'online' value to the Search Result Mustache template. This will, for example, allow you to put things in your Search Result template that will show up when your site is displayed live (PHP), but will not be output when your site is displayed using the offline Javascript, and vice versa.
eg.
{{#online}}
This will only display in your template if it's online.
{{/online}}
{{^online}}
This will only display in your template it it's offline.
{{/online}}
By using the location of the search.js script file, we can determine the root URL of an offline installation as long as the online script has been installed at https://example.com/orcinus/js/search.js