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

Prompted to add to the home screen on Firefox, but not on chrome #19

Closed
raveesh-me opened this issue Apr 3, 2018 · 9 comments
Closed
Labels
bug Something isn't working the way it was designed

Comments

@raveesh-me
Copy link

Hi!
Use case:
WordPress Multisite Running on shared hosting on https://yogaandnaturopathy.in

My lighthouse audits are like this:
pwa report

This medium article seems related:
https://medium.com/progressive-web-apps/im-trying-to-make-a-progressive-web-app-part-5-100-pwa-e27799afd095
As a result, I am prompted to add to the home screen on Firefox, but not on chrome.
Do you think this can be resolved?

I would love to contribute eventually, but I am still learning web development ATM.
Amazing project BTW.

@josevarghese
Copy link
Contributor

Hello @raveesh-me

Thanks for using our plugin Super Progressive Web Apps. I just checked your website https://yogaandnaturopathy.in and here's my findings why PWA is not supporting upon your website.

The issue is mainly caused because you have installed the WordPress within a folder called "wordpress" in your server and you're redirecting all URLs (may be using a plugin) to without "wordpress".

See: https://yogaandnaturopathy.in/wordpress/wp-content/themes/astra/assets/css/minified/style.min.css?ver=1.2.7.2 the URL states files are installed within a folder called wordpress

PWA only works from the folder which you have installed WordPress, as for your case the folder name is "wordpress". That's the issue why PWA is not working within your website.

The best option that I can suggest is to move the files to the root folder and update database accordingly. Don't forget to take the backup of files and database before doing this.

Hope you have got it. Looking forward to hearing from you soon.

Thanks,
Jose
SuperPWA

@raveesh-me
Copy link
Author

you're redirecting all URLs (may be using a plugin)

I am using .htaccess redirect rule that WordPress generated for me during the multisite installation process.

PWA only works from the folder which you have installed WordPress, as for your case the folder name is "wordpress". That's the issue why PWA is not working within your website.

Please elaborate

The best option that I can suggest is to move the files to the root folder and update database accordingly. Don't forget to take the backup of files and database before doing this.

But I do not want to do that. It is fairly common to run WordPress from a separate folder. Also, I have a multi-domain setup where multiple domains are being redirected to the same WordPress multisite folder. I guess the worst case scenario for plugin developers.

Please let me know if there is a way with which I could add support for my use case for your plugin. I will be really thankful for your guidance.

@josevarghese
Copy link
Contributor

Hello,

Within your website https://yogaandnaturopathy.in our plugin checks the site address for creation of settings of SW and Manifest and it retrieves https://yogaandnaturopathy.in/wordpress/ as your site sddress (See General Settings within your WP dashboard page).

It's because the files are at "wordpress" named folder.

Our plugin checks wpurl for the generation of settings , so it cannot retrieve any URLs if you manually added any .htaccess redirect rules. To overcome this you can change the files to root (ie; https://yogaandnaturopathy.in) and change the DB accordingly and save settings of our plugin again. It will surely help you!

Thanks,
Jose

@raveesh-me
Copy link
Author

I don't want to run WordPress from the root directory. Can this problem be solved? Can your plugin provide support for this feature? What changes will we need to make for the same?

@arunbasillal
Copy link
Contributor

Hello @raveesh-me

By design service workers have access to only the files and sub-directories of the directory that it lies in. So if the service worker is in the /wordpress/ directory, it can only work on the example.com/wordpress directory and below that. This is what happens by default.

I have recently come across a way to make this work for folder installs like yours, I need to test it out before I can confirm if it can be done or not. I will update you on the progress here.

As you said, folder installs are not that rare, so its worth checking into.

@raveesh-me
Copy link
Author

Please let me know the same. You could add another option where we could give the directory name for our wordpress directory and you could add that folder to the reference.

@milenpav
Copy link

milenpav commented Jun 2, 2018

Hi thnaks for SuperPWA works great but my site also is instaled in a folder because i use hosting for more then one site. Do you heve some progress about this issue?

@arunbasillal
Copy link
Contributor

Hello @fred4o, thanks for the feedback, glad to hear that!

We are looking into dynamic manifest and service worker files as suggested and discussed in #38. If that goes through, then this will easily be resolved.

@akshaywali akshaywali added the bug Something isn't working the way it was designed label Nov 14, 2022
@Sanjeevsetu
Copy link
Collaborator

Closing the ticket due to inactivity. Still have an issue, Please create a new ticket or contact us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working the way it was designed
Projects
None yet
Development

No branches or pull requests

6 participants