Wrong relative URLs in generated manifest.json #270
Comments
Absolutely. Thank you for reporting. I should fix this next week. |
Not just manifest.json but also wrong relative URL in browserconfig.xml too. |
@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.
@phbernard Are there any updates on the manifest.json related issue (#270)? So far, we have to manually correct the files generated by RFG. |
"manifest.json" files generated by realfavicongenerator.net contain wrong relative paths: RealFaviconGenerator/realfavicongenerator#270 This prevents 404 errors in log when browsers of the Chrome family access the application.
"manifest.json" files generated by realfavicongenerator.net contain wrong relative paths: RealFaviconGenerator/realfavicongenerator#270 This prevents 404 errors in log when browsers of the Chrome family access the application.
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. The results:
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 |
Deployed a minute ago. |
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
"resources/favicons"
.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
resources/icons
appears twice in the URL).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
src
attribute contains a relative URL, it is interpreted relative to the manifest's URL.The text was updated successfully, but these errors were encountered: