Using Web Share API (https?)

Username (e.g. epiz_XXX) or Website URL

(please specify the website or account you are asking about)

Error Message

API implementation doesn’t work

Other Information

I’m trying to implement (through HTML and javascript) the “Web Share API” through it’s navigator.share method.
I understand that for it to work, I have to ensure the page is loaded with https (secure) and not regular http.
I see that I need an SSL certificate to get my infinityfreeapp page to allow https connections. Is that correct? After I get an SSL certificate for my page and install it through the configuration panel, will that make navigator.share() work?
Thanks for any info you can provide on this.

Cheers,
Pablo.

Unlikely to work due to this

1 Like

Not quite, actually.
You see, navigator.share() is a function that is embedded on the browser, and only available on browsers running on mobile OSes like Android or IOS, for example “Chrome on a mobile phone running Android”.
if your HTML code implements navigator.share() and your page was loaded specifically on “Chrome running on Android”, the regular OS-wide “share popup menu” will show up, and your users can ‘share’ whatever you’ve configured to be shared (a string of text, in my case), through their locally-installed apps and clipboard.
It’s all client-side, running on the browser, nothing to do with compromising server security or exposing user private data.
Still… I need https to work to implement the .share() method… thus, the question remains.

It’s not really hard to install SSL, so I would try it and see what happens.

5 Likes

Correct, if you install an SSL/TLS certificate, navigator.share should work.

@KangJL that guide is not applicable to this scenario.

3 Likes

Thanks! @wackyblackie and @PabloGener. At least I learnt something :slight_smile:

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.