Limits
There are some limits you should be aware of when using nuqs or URL params in general.
URL update throttling
Browsers rate-limit the History API, updates to the URL are queued and throttled to a default of 50ms, which seems to satisfy most browsers even when sending high-frequency query updates, like binding to a text input or a slider.
Safari’s rate limits are much higher and require a throttle of 120ms (320ms for older versions of Safari).
For more info how to set custom throttles see Throttling URL updates
Max URL lengths
Most modern browsers enforce a max URL length, which can vary:
- Chrome: ~2 MB (practically, you might encounter issues at around 2,000 characters).
- Firefox: ~65,000 characters.
- Safari: Generally has more restrictive limits (around 8,000 characters).
- IE/Edge: Historically limited to 2,083 characters (IE), although Edge has relaxed this limit.
Keep in mind that not all application state should be stored in URLs. Exceeding the 2,000-character range may indicate the need to reconsider your state management approach.