H
hoke
I want to display plain text files in the browser. The files contain html and javascript and have a .txt extension.
This works fine with files with just html. Unfortunately when showing files with javascript, I get an "error on page" warning and the page is not displayed. I suppose that when Internet Explorer discovers a <script> tag he starts to interpret it. This is not what I want. After all Internet Explorer is a browser and not an interpreter.
Can anybody tell me, or refer me to some documentation, about the reason why Internet Explorer is not just displaying plain text files as they are.
How can I send plain text files to the client and tell the browser: do not interpret this page, just display it. I suppose it has got something to do with MIME types but i am not sure
A workaround would be welcome aswell.
I discovered that everything between <textarea></textarea> tags is displayed as it is (even other tags) but I prefer to display the file itself
With kind regard
Hok
This works fine with files with just html. Unfortunately when showing files with javascript, I get an "error on page" warning and the page is not displayed. I suppose that when Internet Explorer discovers a <script> tag he starts to interpret it. This is not what I want. After all Internet Explorer is a browser and not an interpreter.
Can anybody tell me, or refer me to some documentation, about the reason why Internet Explorer is not just displaying plain text files as they are.
How can I send plain text files to the client and tell the browser: do not interpret this page, just display it. I suppose it has got something to do with MIME types but i am not sure
A workaround would be welcome aswell.
I discovered that everything between <textarea></textarea> tags is displayed as it is (even other tags) but I prefer to display the file itself
With kind regard
Hok