How can I make a web browser view my .h file as text?

Posted by drewbenn on Pro Webmasters See other posts from Pro Webmasters or by drewbenn
Published on 2012-06-05T03:34:58Z Indexed on 2012/06/05 4:48 UTC
Read the original article Hit count: 196

Filed under:
|

I want to post a .h file from a project I'm working on. I set a simple href link to it, like:

<p>Click here to download the <a href=project_strings.h>strings file</a>.

When I click on it, though, my web browser (Iceweasel 12) gives me a prompt to download the file, instead of just displaying it:

enter image description here

Is there any magic I can add to the web page, or as a header to the file (that will still allow it to be included by a .c compiled with gcc), to get the .h file to be displayed in the web browser?

© Pro Webmasters or respective owner

Related posts about html

Related posts about text