Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #22524

Re: Compressing js file?

From emf <emfril@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Compressing js file?
Date 2014-01-03 07:31 -0500
Organization Aioe.org NNTP Server
Message-ID <la6aje$pg0$1@speranza.aioe.org> (permalink)
References (11 earlier) <la149u$7mu$1@speranza.aioe.org> <la28ti$5k6$1@speranza.aioe.org> <635ebfd3-3f5c-48ff-808e-d7796cb608f0@googlegroups.com> <la44vv$ivb$1@speranza.aioe.org> <07f1b830-811b-46ae-a93e-9ae118aa2915@googlegroups.com>

Show all headers | View raw


On 2014-01-02 12:34 Michael Haufe (TNO) wrote:
> On Thursday, January 2, 2014 10:43:48 AM UTC-6, emf wrote:
>>
>> Thanks. I updated the .htaccess file:
>>
>>     AddOutputFilterByType DEFLATE application/vnd.ms-excel
>>
>> Unfortunately, the Http Compression Text is still negative:
>>
>>     https://files.nyu.edu/emf202/public/nt/ephemeris.csv is not gzipped
>>
>> Unless there is another solution, I think I'll have to contact the NYU
>> IT department and see what they will say.
>
> According to Chrome's network inspector, now it's being served as
> application/octet-stream.
>
> Something definitely screwy with your server. Perhaps try the other
> method listed in the earlier mentioned article and do it based on file
>-extension. Otherwise I'd agree with you to talk to IT and see what is
> going on with the settings

The article also mentions using PHP

============
If you can't change your .htaccess file, you can use PHP to return 
compressed content. Give your HTML file a .php extension and add this 
code to the top:

In PHP:

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) 
ob_start("ob_gzhandler"); else ob_start(); ?>
============

The issue is that I do not need the csv not the html file to be 
deflated. And I can't apply this to the csv, or can I?

emf

-- 
Google's top Spherical Triangle Calculator search result!
https://files.nyu.edu/emf202/public/js/spherical.html

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Compressing js file? emf <emfril@gmail.com> - 2013-12-23 14:31 -0500
  Re: Compressing js file? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2013-12-23 22:08 -0200
  Re: Compressing js file? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-12-23 16:40 -0800
    Re: Compressing js file? emf <emfril@gmail.com> - 2013-12-24 13:23 -0500
    Re: Compressing js file? emf <emfril@gmail.com> - 2013-12-26 21:56 -0500
      Re: Compressing js file? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-12-27 09:52 +0100
        Re: Compressing js file? emf <emfril@gmail.com> - 2013-12-27 08:18 -0500
          Re: Compressing js file? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-12-27 16:59 +0100
            Re: Compressing js file? emf <emfril@gmail.com> - 2013-12-27 15:32 -0500
              Re: Compressing js file? emf <emfril@gmail.com> - 2013-12-28 15:12 -0500
                Re: Compressing js file? emf <emfril@gmail.com> - 2014-01-01 02:17 -0500
        Re: Compressing js file? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-12-28 20:20 +0000
      XHR with timing issues (was: Compressing js file?) Christoph Michael Becker <cmbecker69@arcor.de> - 2013-12-27 22:33 +0100
        Re: XHR with timing issues (was: Compressing js file?) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-12-27 23:26 +0100
          Re: XHR with timing issues Christoph Michael Becker <cmbecker69@arcor.de> - 2013-12-28 12:08 +0100
            Re: XHR with timing issues emf <emfril@gmail.com> - 2013-12-28 09:04 -0500
  Re: Compressing js file? wolfgang zeidler <invalid@invalid.invalid> - 2013-12-27 22:33 +0100
    Re: Compressing js file? emf <emfril@gmail.com> - 2013-12-28 00:16 -0500
      Re: Compressing js file? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-12-28 11:13 +0100
        Re: Compressing js file? emf <emfril@gmail.com> - 2013-12-28 11:26 -0500
          Re: Compressing js file? emf <emfril@gmail.com> - 2013-12-28 13:53 -0500
            Re: Compressing js file? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-12-28 21:00 +0100
              Re: Compressing js file? emf <emfril@gmail.com> - 2013-12-29 21:47 -0500
                Re: Compressing js file? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-12-31 14:05 -0800
                Re: Compressing js file? emf <emfril@gmail.com> - 2014-01-01 02:50 -0500
                Re: Compressing js file? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-01-01 01:16 -0800
                Re: Compressing js file? emf <emfril@gmail.com> - 2014-01-01 08:13 -0500
                Re: Compressing js file? Tim Streater <timstreater@greenbee.net> - 2014-01-01 14:17 +0000
                Re: Compressing js file? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-01-01 15:31 -0800
                Re: Compressing js file? emf <emfril@gmail.com> - 2014-01-01 18:38 -0500
                Re: Compressing js file? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-01-01 15:45 -0800
                Re: Compressing js file? emf <emfril@gmail.com> - 2014-01-02 11:43 -0500
                Re: Compressing js file? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-01-02 09:34 -0800
                OT: Compressing js file? Christoph Michael Becker <cmbecker69@arcor.de> - 2014-01-02 19:52 +0100
                Re: Compressing js file? emf <emfril@gmail.com> - 2014-01-03 07:19 -0500
                Re: Compressing js file? emf <emfril@gmail.com> - 2014-01-03 07:31 -0500
                Re: Compressing js file? Tim Streater <timstreater@greenbee.net> - 2014-01-02 09:14 +0000
                Re: Compressing js file? Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-01 16:25 +0000
                Re: Compressing js file? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-01 21:36 +0100
          Re: Compressing js file? wolfgang zeidler <invalid@invalid.invalid> - 2013-12-29 20:06 +0100
            Re: Compressing js file? wolfgang zeidler <invalid@invalid.invalid> - 2013-12-29 20:27 +0100
        Re: Compressing js file? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-12-29 18:02 +0000
          Re: Compressing js file? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-12-30 18:17 +0100
            Re: Compressing js file? John Harris <niam@jghnorth.org.uk.invalid> - 2013-12-31 10:52 +0000
            Re: Compressing js file? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-12-31 13:38 +0000
              Re: Compressing js file? John Harris <niam@jghnorth.org.uk.invalid> - 2013-12-31 15:02 +0000
                Re: Compressing js file? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-01 16:42 +0000
                Re: Compressing js file? Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-01-01 21:32 +0000
            Re: Compressing js file? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-12-31 21:44 +0000

csiph-web