How to not send "content-type" - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to not send "content-type" (/showthread.php?tid=60097) |
How to not send "content-type" - El Forum - 01-15-2014 [eluser]Ñuño Martínez[/eluser] I wrote a controller to send the CSS file. In short, it's something like this: Code: class styles extends CI_Controller { Is it possible to avoid the "Content-Type" header? How to not send "content-type" - El Forum - 01-15-2014 [eluser]CroNiX[/eluser] Maybe just set the correct mime type before you send the file out. If there isn't a mime type the browser won't know how to correctly interpret the file. Code: header("Content-type: text/css; charset: UTF-8"); How to not send "content-type" - El Forum - 01-16-2014 [eluser]Ñuño Martínez[/eluser] Thank-you very much. I was thinking about using "header" but I discarded it too soon... :red: |