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

Hide ?force=1 in the URL using History API #2

Open
borismus opened this issue Apr 24, 2012 · 5 comments
Open

Hide ?force=1 in the URL using History API #2

borismus opened this issue Apr 24, 2012 · 5 comments

Comments

@borismus
Copy link
Owner

Device.js lets you force loading the exact version of the app to load through the combination of ?device=deviceClassId and ?force=1 GET parameters. However, these could be hidden to give a cleaner URL.

@englishextra
Copy link

actually redirecting is bad pracice. t'll be greate just returning a value = desktop | phone | tablet. So the script is useless in most cases

@borismus
Copy link
Owner Author

@englishextra here redirection only happens if you're on the wrong version of the page. but yes, client-side redirection definitely has performance overhead.

@steiganwald
Copy link

👍 our team would appreciate this

@0xadri
Copy link

0xadri commented Jul 15, 2014

So from what I understand the URL would be such as "www.myurl.com?device=deviceType" ?
If yes, then +1.
Cleaner URL for the user means an easier URL to share (ie. via email, chat, telephone, & so on) & probably a better understanding of what's happening - for those users who actually "observe" URLs, which I believe is quite common.

@englishextra
Copy link

just replace with return 1 - this is in my case
Oh thanks for the script - really handy - use it in all projects

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

4 participants