I've created a web application and have it set up so that if the user launches the web app from the homescreen it will operate similar to a native app.
On the Chrome developer site, they state
Do not prompt the user to add your app to the homescreen.
I cannot find anything related to this with regards to iOS/Safari or Mozilla/Firefox best practices.
Is it bad practice to prompt a user to add your web app to the homescreen even though it might enhance the user's experience?
The only point I can think of is branding. Most of native apps providing OS have an own brand language and want apps to feel like they are native on the device.
Apple, for instance, puts in a major effort to enforce native design guidelines. Apple also tends to do that more and more.
But, after all, for Firefox that would not make any sense to me.
If you are going to prompt the user to do anything, you should consider what the user is doing when you are prompting them, and why you are prompting them. Prompts should occur in the right context and help the user achieve their goal. In this particular case, "might enhance [their] experience" is an insufficient reason to stop the user from doing what they actually came to your website to do.
Do not prompt the user to add your app to the homescreen. There is no way to detect if the app is running installed or not.
I'm pretty sure google list this as a best practice (here) to discourage being overly pushy or demanding that a page be added to the home screen. I imagine some (rude) web pages insisted on being put on the home screen and maybe offered extra features if installed, so Chrome disallows this by ensuring "There is no way to detect if the app is running installed or not."
Prompting to add the page to the home screen, in and of it itself, is not a bad practice. It can be a bad practice it's pushy, self-serving, coercive, demanding, etc.
Cache file /home/queryxchang/questarter.com/apps/frontend/config/../cache/-q-prompting-users-to-save-web-app-to-homescreen-17-87701-html could not be written