Skip to content

WhatsApp/0 returns content (preview generated) as expected while Whatsapp/2 doesn't #174

Open

Description

@paulincai

I use the latest versions of node and server Prerenders.

WhatsApp/0, as I see it in the logs is for the mobile App and WhatsApp/2 is for both Web and OSX App (possibly Windows App too)

Will just link my comment into another Issue:
From the server log:

54.170.31.203 - - [20/Mar/2019:22:07:41 +0000] "GET /https://www.activitree.com/activities/culture/archaeological_site HTTP/1.1" 200 36042 "-" "WhatsApp/0.3.2386 N"                                
54.170.31.203 - - [20/Mar/2019:22:08:02 +0000] "GET /https://www.activitree.com/activities/culture/archaeological_site HTTP/1.1" 200 36042 "-" "WhatsApp/2.19.31 i"   

#168 (comment)

Activity

  1. thoop commented on Mar 28, 2019

    @thoop
    Contributor

    That is unexpected since the prerender-node middleware checks for WhatsApp as a substring of the incoming user agent (both lowercased before compared) So I would expect both of those requests to return a prerendered page.

    I'm not able to reproduce this in local testing either. Using both of those user agents seem to return a prerendered page for me when testing a website of mine with prerender-node installed.

    So when you use WhatsApp/2 is it just returning your javascript page?

  2. paulincai commented on Mar 30, 2019

    @paulincai
    Author

    Hi @thoop, I would assume the prerendered page is returned cause I can see the response on the Prerender server console when I share a link on my mobile (tried both and Android phone and Iphone):

    NGINX:

    54.155.24.245 - - [30/Mar/2019:16:28:31 +0000] "GET /https://www.activitree.com/ HTTP/1.1" 200 41179 "-"                                                          
    "WhatsApp/2.19.34 A"   
    

    Prerender:

    2019-03-30T16:28:31.613Z got 200 in 13ms for https://www.activitree.com/ 
    

    This is similar to the responses when I share from Whatsapp on my MAC, the only difference is that MAC Whatsapp and browser Whatsapp show the preview. You can experience that with this link https://www.activitree.com and I can confirm in advance that the Prerender server will have similar responses (all my routes are Prerendered already.)

  3. thoop commented on Apr 1, 2019

    @thoop
    Contributor

    Hmm, could it be possible that WhatsApp on mobile had a previously cached version of your page from before you installed Prerender? Otherwise, that seems like it's working as expected but WhatsApp just isn't showing the info properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions