Tuesday, January 17, 2017

404 not found.

Got the error "Failed to decode downloaded font OTS parsing error: invalid version tag" and looks like the font can be read/decoded by the browser as the font can be previewed in the browser:





Making it seems that the reason why TinyMCE is not loading the fonts correctly..




..is due to incorrect mime type of text/html:




Although the font can be previewed by the browser, it looks like it is from previous successfully loaded font. Meaning, the browser aggressively caches the fonts, making it look like there is a very serious error, e.g., incorrect mime type of text/html when it should be application/woff, when in reality it is just a 404 that resulted to a 404 page(seemingly), yet without the status code of 404. A page is text/html.


The docker built just don't have font files in it.


Suggestions like nginx has missing mime types for the fonts, made the error looks complex than it really is.


404s are mostly a page, so that might be reason for the content type of text/html being reported by the browser. The browser might be returning a page, but it's hard to actually know since what the browser previews is the actual font, not a page. As for why the app is not returning status code of 404, would have to find out.



Happy Coding!

No comments:

Post a Comment