Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS Safari renders the mobile site, should render root site #4

Open
sbarber2 opened this issue Sep 26, 2023 · 2 comments
Open

MacOS Safari renders the mobile site, should render root site #4

sbarber2 opened this issue Sep 26, 2023 · 2 comments

Comments

@sbarber2
Copy link
Contributor

sbarber2 commented Sep 26, 2023

MacOS Safari 16.5.1 renders the mobile site, should render desktop site.

This doesn't happen, for example, on MacOS Chrome 117.

@sbarber2
Copy link
Contributor Author

Hmm, this problem doesn't happen when viewing the site locally with pyserver.py, but it does happen on the live site browsing to https://planttracer.com

@sbarber2
Copy link
Contributor Author

sbarber2 commented Sep 27, 2023

Some notes to guide further investigation:

Browsers ignore the extension; they only consider the Mime-Type set in the HTTP header. We aren't setting the Mime-Type in the header and not in a meta tag. However, the document itself begins:

(base) webapp % curl --dump-header /tmp/head https://planttracer.com/plantliteracy | head                                    (audit-page)webapp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8212  100  8212    0     0   102k      0 --:--:-- --:--:-- --:--:--  104k
<!DOCTYPE html>

<html>

    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>
        Plant Literacy
    </title>

Mime type inference is apparently called "MIME Sniffing" and is discussed here:
https://security.stackexchange.com/questions/256357/is-mime-sniffing-still-something-to-protect-against-with-modern-browsers-with-x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant