Wrong relative URLs in generated manifest.json #270
I prefer placing all resources generated by RFG in a seperate folder, e.g. http://www.example.com/myapp/resources/favicons. To achieve that, I use the "I cannot or I do not want to place favicon files at the root of my web site. Instead I will place them here" option and specify the relative path
This generates the following manifest.json:
And the following include for http://www.example.com/myapp/index.html:
This results in 404 errors because Chrome tries to access http://www.example.com/myapp/**resources/favicons/resources/favicons/**android-chrome-192x192.png (the part
I think, the manifest.json should not contain the specified relative prefix, because the manifest file is already at that location. The specification (https://w3c.github.io/manifest/#src-member) states, that if the
The text was updated successfully, but these errors were encountered:
@ve3 Are you sure about this? I just had the opportunity to test my application with a Windows 10 tablet. When the browserconfig.xml just references the image filenames (in the same subfolder), they cannot be found when pinning the page to a tile. The paths generated by RFG (including the subfolders) however are working as expected.
First, I'm very sorry for this late feedback. This is an important issue and it should have been fixed long ago.
I tested the different platforms. To do this, I created the following site:
So whatever the browser behavior (use HTML page or manifest as the reference), there is an icon to load. The goal is to note the color of the displayed icon.
In the end, only Android Chrome needs to be fixed.
The next steps:
The fix is implemented and unit-tested.
However, it raises another issue. Some API clients cannot regular paths. For example, the Ruby on Rails generator needs to generate code such as
If the fix for #270 is deployed as is, the RoR client (and maybe others) is suddenly broken. Because it expects to find a placeholder everywhere but don't anymore.
A long-term solution would be for RFG to provide a templating system support. For example, RoR could pass
What I'm thinking of right now is an extra parameter which means "I want the path to appear everywhere no matter what". Its default value is