Replies: 9 comments
-
Possible solutions that I can think of:
|
Beta Was this translation helpful? Give feedback.
-
NB, this is not only affecting filters, but also the option to compare terms: if somebody wanted to compare many terms here (and there are users who do), the URL would also exceed limits. Perhaps we do indeed need to sacrifice the readability of the URL for being able to bookmark wordy queries as well? Wordy queries would have to be sent as JSON perhaps? |
Beta Was this translation helpful? Give feedback.
-
They're always sent as JSON to the backend, so this just affects the URL in the frontend. That said, any form of caching / saving / bookmarking queries could affect the ability to share links with other users / have permanent links / share links between instances. |
Beta Was this translation helpful? Give feedback.
-
What I mean is that the frontend could provide a text field to post JSON queries directly, instead of having to construct queries through the URL or UI. But that's a new feature. What we now thought would be a good idea: build in a check for the length of the URL, and if it does get too long, turn it into That being said, the visualization parameters would also need to implement such a mechanism, but aren't now saved to the backend. |
Beta Was this translation helpful? Give feedback.
-
Using the search history ID is tricky since having search history is optional. |
Beta Was this translation helpful? Give feedback.
-
Another option: always save queries in the backend, even if not bookmarked. Use a hash (SHA256 or something like that) of the normalized JSON representation as the identifier. If the identifier is already in the database, it does not need to be saved, preventing duplicates. Bookmarks refer to the identifier. The URL includes only the identifier, not a full representation of the parameters. |
Beta Was this translation helpful? Give feedback.
-
I do think that saving (anonymous) queries is a step back in terms of privacy and maintainability, but yes, that would be the way to handle it. The listed browser limits are quite long, so I do think that we could probably do a lot by encoding information more efficiently. To my knowledge, this can happen in the following scenarios:
|
Beta Was this translation helpful? Give feedback.
-
2 KiB is not that long. I don't think you should tell users they can only make queries that fit in that space. Researchers sometimes have complicated questions, and making intricate queries might sometimes be necessary. As for the hash-based approach, it should not compromise privacy because you do not need to save any association between a query and a user. The query does not even need a timestamp. |
Beta Was this translation helpful? Give feedback.
-
Oh I read that wrong, I thought it was 2k characters! |
Beta Was this translation helpful? Give feedback.
-
What went wrong?
When selecting so many filters that the URL exceeds a certain amount of characters, browsers will throw a 414 - Request-URI Too Long Error. It will not do so immediately upon selecting the filter, the site stays functional until the user reloads the page, or navigates to it using the URL.
These are the character limitations for the browsers (source):
This bug occurs for the following corpora:
What did you expect to happen?
this exact thing, just making a note of it here.
Screenshot
No response
Where did you find the bug?
Version
No response
Steps to reproduce
Just select a filter that has a lot of options (or options with very long names) and select all of them, e.g. 'Company' in the Dutch Annual Reports, or 'Newspaper Title' in Dutch Newspapers
Beta Was this translation helpful? Give feedback.
All reactions