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

Master-Index link is illegible if you click on it in Google Chrome #27

Open
dfabulich opened this issue Feb 11, 2024 · 1 comment
Open

Comments

@dfabulich
Copy link
Contributor

When you click on the link to Master-Index.xml in Google Chrome, it just renders the file using Chrome's default stylesheet, which hides all tag names. It's illegible.

image
@dfabulich
Copy link
Contributor Author

dfabulich commented Feb 11, 2024

I tried to fix this in #23, but that PR was closed, with this explanation:

#23 (comment)

We shouldn't be making assumptions about what the user's browser does, or trying to undermine the defaults. Browser defaults change faster than this web site. If someone wants to download a file, they can select "Download" in the context menu or whatever works for them.

Firefox and Safari handle XML files fine. Maybe Chrome will next week. We don't need to play guessing games.

First, I think you'll find that Safari does not handle this XML file fine. In Safari 17.3 on macOS Sonoma 14.3 on a 2021 M1 Max CPU, it takes more than a minute to load the file. I admit, that it seems OK in Firefox.

But I want to directly address your point about "guessing games." Are we working around a browser bug that might be fixed next week?

I claim that Master-Index.xml isn't really very useful in a browser tab in any browser. That's just not how any user would interact with this XML file. The only thing to do with it is to download it and interact with it in code. It's an API for the archive, it's not part of the archive's user interface.

Once you click on it, and it opens in a tab, and you realize what's happened to you, you're going to want to download it. You'll probably want to Save As… on a Mac. On Windows, you'll click the little "..." meatball menu and find the "Save" option.

But why are we making users jump through that hoop? Speaking for myself, every time I click on the Master-Index.xml link and it opens in a browser tab, I audibly swear, because I forgot that I never want to click on that link. I always want to right-click and download it.

In #23, I proposed adding a download attribute, which is a one-line improvement. But another related fix would be to add a Content-Disposition: attachment; filename="Master-Index.xml" header, which gives browsers a hint that "you're probably going to want to download this, because viewing a 10MB XML file in a browser tab isn't a good idea."

So, yes, this does workaround some browser bugs on multiple browsers, but it's also a usability improvement. Maybe you think that working around these browser bugs is not worth the trouble, but I think the usability improvement is a small but good one.

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