Android/iPhone “Add to Home Screen” url customization - javascript

I have a website and when user adds it to home screen, it saves current url.
For example: if user is on example.com/categories page, application will save this url and when user opens application from home screen, it will opens example.com/categories.
I want to customize it in such a way that when user saves to home screen, starting page always was home page (example.com)
How can I achieve it ? is it possible?

Related

How to redirect to another site automatically in Next.js

I am trying to make my progressive web app automatically redirect to another site when the user clicks on the icon on their desktop.
As of right now when the user clicks on the icon it opens up a landing page where the user can link on the link to be redirected.
I'm using Next.js and JavaScript. I appreciate any help you can give me.

How to prevent the user from manually going to the url, requiring that they click a link to get there

I have a website about a factory of chocolates, I'm working in Laravel and PHP. In my website I have a login, and different types of users.
Until there is every ok. If I login as an admin. The website shows the administration control panel as home page. In this site I have a menu with many operations for only admin users.
For example I have a menu about add new users. The url of the menu in the top bar navigation is:
localhost/BestChoco/NewUsers
And in this menu I have a button that redirect to another view that is a form to add new users.
Now th url is:
localhost/BestChoco/NewUsers/create
Is in this case, for example, I want to prevent the user, type in the top bar that url.
If the user type localhost/BestChoco/NewUsers/create in the top navigation bar, without visited the page of users, the website redirect automatically to the home page.
The home page is called index.blade.php Is the same for all user but the content changes depending on the user logged in. How can I do it?
No. The page cannot control default browser navigation bar behaviour.
You should be using a permissions-based method to kick unauthorized users out of that page if they manage to navigate there. You must manage this via your PHP code.

Web - Add to Home Screen not maintaining current page

I'm building a web app which has a login page that I've added a script to allow the user to Add to Home Screen and it opens up fullscreen without the safari toolbars.
However once you pass the first page (login screen) and go to any other screen, if you press the home button and put the app to the background and then re-enter, it kicks you back out to the first login page.
Could anyone shed some light on what is happening there?
Thanks.

prevent file from being redownloaded

I have a website, on one of its pages a file is automatically downloaded when the page is loaded
How do I prevent the file from being automatically redownloaded once he returns to this page in the following conditions
user clicks refresh on this page
user navigates away from this page, and then clicks the back button to come back to this page ?

Mobile Landing go back no redirection

I'm trying to make a web page that redirects to a mobile land page. It works, but on the mobile land page I want to go to the main page without using redirection but, of course, each time I go to the main page, it redirects me to the mobile land page (of course, as the script runs...).
So my question is: how can I link the mobile land page to the main page without redirecting when I link to it?
You could add a parameter on the url to the main page on the mobile site eg:
Go to full site
Then on the main page check if the parameter exists before redirecting.
var mredirect = getParameterByName("mredirect");
if(!mredirect && isMobile){
//redirect to mobile site
}
getParameterByName : How can I get query string values in JavaScript?

Categories