Failing deploying a file named 404.html
See original GitHub issueI was deploying a 404.html
file and faced some weird problems!
The deploy was successful, but my service worker was always failing to install due to a fetch failure (for this 404.html
file, which was always not found when the sw tried to fetch it and store it into cache).
I simply renamed the 404.html
into not-found.html
and it started working normally.
Any idea about the reason for this behaviour? In my local environment it works with the 404.html file, tried in many different machines and devices, so, I don’t think it is a problem with the service worker itself.
Indeed, after deploying, when going for the /404.html
address in the browser, I got a not found page (the zeit’s now 404 page) instead of the (existing??) file named 404.html.
Interestingly enough, the 404.png
file works normally.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top GitHub Comments
@leo did you get the point of this issue? That PR you had mentioned hadn’t actually much to do with it. The problem is the file name. If the file being requested is
404.html
, it will deliver the zeit’s 404 page, not the customised 404.html being requested. When the we simply rename it to anything else, it works.I thought it had already been fixed as you had closed it, and haven’t tried it lately. Am just mentioning it here because I see @jackrobertscott has faced it and brought this issue back to light 😃
Thank you so much for the effort you have put into this issue! 😊
However, since we completely re-worked the entire codebase of Now CLI and this issue does not apply to the new code anymore, I’m closing it now.
You can read more about our biggest release yet here: https://zeit.co/blog/now-2