We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am unable to use URL parameters with window.location.href
This works: window.location.href = 'test.html'
But this doesn't work: window.location.href = 'test.html?test=test'
The console outputs "Navigated to http://127.0.0.1:1430/test.html?test=test" but the page does not change.
I am using plain HTML with no build tools or frameworks. I have also tried using the following but it returns the same result:
window.location.href = encodeURIComponent(test.html?test=test, 'UTF-8')})
test.html?test=test, 'UTF-8')}
I was able to reproduce the problem in a freshly created Tauri HTML app.
It should route to test.html and the URL params should be available in the test.html page.
[✔] Environment - OS: Windows 10.0.19045 X64 ✔ WebView2: 118.0.2088.76 ✔ MSVC: Visual Studio Community 2022 ✔ rustc: 1.72.0 (5680fa18f 2023-08-23) ✔ cargo: 1.72.0 (103a7ff2e 2023-08-15) ✔ rustup: 1.26.0 (5af9b9484 2023-04-05) ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default) - node: 18.18.0 - yarn: 1.22.19 - npm: 10.1.0 [-] Packages - tauri [RUST]: 1.5.2 - tauri-build [RUST]: 1.5.0 - wry [RUST]: 0.24.4 - tao [RUST]: 0.16.5 - @tauri-apps/api : not installed! - @tauri-apps/cli [NPM]: 1.5.6 [-] App - build-type: bundle - CSP: unset - distDir: ../src - devPath: ../src
No response
The text was updated successfully, but these errors were encountered:
Managed to solve? I have the same problem, but instead of staying on the same page it sends it to the home page.
Sorry, something went wrong.
Indeed. Same problem. It routes to home page. I had to use uri hash instead.
fix(cli): Ignore query parameter in dev server
776d378
fixes #8148 additional ref: https://discord.com/channels/616186924390023171/1201199918379974766
fix(cli): Ignore query parameter in dev server (#8697)
0bff8c3
* fix(cli): Ignore query parameter in dev server fixes #8148 additional ref: https://discord.com/channels/616186924390023171/1201199918379974766 * Update .changes/cli-devserver-queryparam.md --------- Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
@damooo the recommendation was to use localStorage to save the information, however this occurs in DEV mode in build and it works normally
No branches or pull requests
Describe the bug
I am unable to use URL parameters with window.location.href
This works:
window.location.href = 'test.html'
But this doesn't work:
window.location.href = 'test.html?test=test'
The console outputs "Navigated to http://127.0.0.1:1430/test.html?test=test" but the page does not change.
I am using plain HTML with no build tools or frameworks. I have also tried using the following but it returns the same result:
window.location.href = encodeURIComponent(
test.html?test=test, 'UTF-8')}
)Reproduction
I was able to reproduce the problem in a freshly created Tauri HTML app.
Expected behavior
It should route to test.html and the URL params should be available in the test.html page.
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: