I have a simple play app. All of it’s actions render to views. About 10% of the time, (can’t determine a repro case), the page loads as if it’s viewing source. All the HTML shows up in the client browser, but just as text, it doesn’t get rendered as a webpage.
What would cause Play to just dump all the response text to the browser in a manner that prevents the browser from recognizing it as HTML and rendering it?
This has got me stumped, and it’s a real pain for customers. Just hitting reload on their browser fixes it, but still, they don’t know to do that.
Thanks in advance
Josh
Did some sleuthing, and it turns out the page whose html is getting returned is actually the 404 error page. I looked at the 404 page and realized it’s content type is being set dynamically, (which is not the case with all my other screens). So I changed it from ${_response_encoding} to just be hardcoded to UTF-8 like all my other html templates. Soooo, I’m praying that explains why when the 404 page was sent to clients their browser didn’t know what content type it was.