Add application/javascript to gzip_types
Currently, I believe, application/javascript is not included in the default types for the static gzip settings. Can you add it?
Thanks.
Discussions are closed to public comments.
If you need help with AppHarbor please
start a new discussion.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
Support Staff 1 Posted by rune on 07 Jun, 2017 03:06 AM
Hi,
Apologies for the slow response. You're right --
application/javascriptis not current a default gzip type on the platform. The currently supported gzip types are:The gzip types isn't configurable per-application on the shared load balancers, but it might be time to reevaluate the inclusion of
application/javascriptconsideringtext/javascriptis now considered "obsolete" -- should still work though, so using that type instead may be a reasonable workaround for the time being?Best,
Rune
2 Posted by valmont on 07 Jun, 2017 03:09 PM
Hi, Rune.
Even though I have specified type="text/javascript", the response headers still show a content type of application/javascript.
Any chance this can get added to the the core configuration?
3 Posted by valmont on 07 Jun, 2017 03:22 PM
Decided to make an IHttpModule to explicitly set the content type. Let me know when/if the conig is updated.
Support Staff 4 Posted by rune on 09 Jun, 2017 01:21 AM
Hi,
Ok so another approach might be to just instruct the static file handler to set the content type for static content. I haven't tested this, but I'm pretty sure this would do the trick:
I'll let you know when the gzip configuration is updated -- the load balancers have a couple of updates scheduled for later this month, so hopefully it'll be possible to have this evaluated and tested before then. Adding the gzip type is very straightforward, but could potentially cause issues for other apps using the shared load balancers, so we have to take greater care when making these types of changes!
Best,
Rune
rune closed this discussion on 09 Jun, 2017 01:21 AM.