Skip to content
New issue

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

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

Already on GitHub? # to your account

Unable to open PDF files on Chrome #683

Open
Popolechien opened this issue Jun 12, 2024 · 5 comments
Open

Unable to open PDF files on Chrome #683

Popolechien opened this issue Jun 12, 2024 · 5 comments

Comments

@Popolechien
Copy link
Member

Popolechien commented Jun 12, 2024

I'm testing recently created Nautilus zim files on dev.library.kiwix.org and when I try to browse the corresponding PDF they get blocked by Chrome (Windows)
image

The behaviour does not seem to reproduce on library.kiwix.org

@kelson42
Copy link
Contributor

duplicate of #670?

@Popolechien
Copy link
Member Author

Popolechien commented Jun 12, 2024

Nope, different problem, I cannot reproduce the issue on Chrome mobile.

@rgaudin
Copy link
Member

rgaudin commented Jun 13, 2024

I can reproduce and it is not iframe-related as this happens also when browsing on /content.

It does not happen on direct links though.

I tested on a recent Chrome (126), might be interesting to test with an older versions. I see in the inspector that it has a Sec-Fetch-Mode: navigate request header. Server doesn't care but it indicate how Chrome considers this.
Is it possible that Chrome now prevents navigating to PDF document ?? Right-clicking open in new tab works as expected…

Screenshot 2024-06-13 at 08 08 59

@mgautierfr
Copy link
Member

Tested with a random from https://www.gutenberg.org/files/29801/ (clicking to https://www.gutenberg.org/files/29801/29801-pdf.pdf).

pdf open correctly.

Difference seems to be on Cache-Control and Strict-Transport-Security (but not sure it is actually the root cause)

image

@mgautierfr
Copy link
Member

Removing the `target="_blank" on the link in the node tree make the pdf opening correctly in the current tab...

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants