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

Cache busting query string breaks URLs with an existing query string #3307

Closed
kennethlove opened this issue Dec 9, 2024 · 0 comments · Fixed by #3315
Closed

Cache busting query string breaks URLs with an existing query string #3307

kennethlove opened this issue Dec 9, 2024 · 0 comments · Fixed by #3315
Labels
bug Something isn't working desktop Suggestions related to the desktop renderer hot-reload Related to the hot reload crate web relating to the web renderer for dioxus

Comments

@kennethlove
Copy link

Problem

To enable Dioxus' hot reload, a random float is added as a query string to URLs for assets. If the URL already contains a query string, e.g. https://example.com?foo=bar, appending ?0.123435212 creates an invalid URL. This can interfere with requesting remote resources.

Steps To Reproduce

Steps to reproduce the behavior:

  • dx new web
  • add document::Stylesheet { href: asset!("https://example.com?foo=bar") }
  • examine the requests made by your app, notice that the stylesheet asset has an extra query string

Expected behavior

To enable cache busting, I would expect a URL to get a new query string key/value pair when the URL already contains a query string, e.g. https://example.com?foo=bar&cache-bust=0.323432432. If the URL does not contain a query string, I would expect the current behavior, e.g. https://example.com?cache-bust=0.352432432.

Environment:

  • Dioxus version: 0.6.0
  • Rust version: nightly
  • OS info: Windows 11 and Linux Mint
  • App platform: fullstack
@ealmloff ealmloff added bug Something isn't working web relating to the web renderer for dioxus desktop Suggestions related to the desktop renderer hot-reload Related to the hot reload crate labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working desktop Suggestions related to the desktop renderer hot-reload Related to the hot reload crate web relating to the web renderer for dioxus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants