0

I have created a simple PHP script which downloads files (sends them to the browser). The script sends the browser the type of document, for example MIME type "application/gz" for example document test.tar.gz

However, on receiving the document Chrome complains:

Resource interpreted as Document but transferred with MIME type application/gz

Am I setting the wrong MIME type? (Please don't focus on why I'm creating my own download script...just the MIME issue)

TSG
  • 4,242
  • 9
  • 61
  • 121
  • See http://stackoverflow.com/questions/23600229/what-content-type-header-to-use-when-serving-gzipped-files – Barmar May 22 '15 at 21:45
  • 1
    According to [IANA](http://www.iana.org/assignments/media-types/media-types.xhtml) the correct MIME type for .gz files is [`application/gzip`](http://www.iana.org/assignments/media-types/application/gzip). – vcsjones May 22 '15 at 21:46

1 Answers1

0

VCSjones was correct - I needed to change the MIME type to application/gzip and then Chrome no longer complained.

TSG
  • 4,242
  • 9
  • 61
  • 121