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

support for URL hash #1574

Open
zhang-ming-hao opened this issue Jan 9, 2025 · 3 comments
Open

support for URL hash #1574

zhang-ming-hao opened this issue Jan 9, 2025 · 3 comments

Comments

@zhang-ming-hao
Copy link

Specification

  • pywebview version: 5.3.2
  • operating system: windows 11
  • web renderer:

Description

The hash property of the URL interface is a string containing a '#' followed by the fragment identifier of the URL.
Most SPA applications support hash mode.
For example, in the URL dist/index.html/#/login, the server will not receive the content after the '#' and will return the content of index.html. However, frameworks like Vue Router or React Router can load the login page.

Practicalities

  • NO I am willing to work on this issue myself.

  • NO I am prepared to support this issue financially.

@r0x0r
Copy link
Owner

r0x0r commented Jan 9, 2025

What do you propose?
Hash part of the url is not sent to the server and is handled exclusively by the browser. Vue and React routers process hash urls in the browser code.

@zhang-ming-hao
Copy link
Author

when I call create_window and set the URL to dist/index.html/#/login, the browser shows a 404 error. The BottleServer does not strip the content before the # and return index.html.

@r0x0r
Copy link
Owner

r0x0r commented Jan 10, 2025

You have a trailing slash in your url there. Try dist/index.html#/login

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

2 participants