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

Jina Reader doesn't abide by viewport #1169

Open
norvalbv opened this issue Mar 18, 2025 · 1 comment
Open

Jina Reader doesn't abide by viewport #1169

norvalbv opened this issue Mar 18, 2025 · 1 comment

Comments

@norvalbv
Copy link

Hi, i'm adjusting my viewport configuration and testing Jina against my own site; all events are being tracked in Mixpanel automatically. I've got the following request:

curl https://r.jina.ai/ \
  -H "DNT: 1" \
  -H "X-No-Cache: true" \
  -H "X-Return-Format: markdown" \
  -H "X-Timeout: 10" \
  -H "X-Token-Budget: 20000" \
  -H "X-Wait-For-Selector: body" \
  -d @- <<EOFEOF
  {
    "url": "https://www.<redacted>.com/",
    "viewport": {
        "width": 1280,
        "height": 800
    }
  }
EOFEOF

Upon checking my mixpanel, the event auto-generated is as follows:

{
  "event": "page_view",
  "properties": {
    "time": 1742299518.225,
    "$browser": "Chrome",
    "$browser_version": 134,
    "$os": "Linux",
    "$screen_height": 600,
    "$screen_width": 800,
    "Path": "/",
    "mp_country_code": "US",
    "mp_lib": "web",
// rest omitted
  }
}

As you can see the screen width and height aren't the same as the ones given in the request. How do I solve this?

@nomagick
Copy link
Member

Hi @norvalbv

I'm not sure how "mixpanel" detects screen width or height, but Reader should have a default viewport of 1024x1024, even if the viewport settings are not working.

You can verify the viewport settings by requesting with x-return-format: screenshot and check the width/height of the output image.

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

2 participants