News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF and OB_GZHandler; ... and headers...

Started by drewactual, April 06, 2019, 11:38:15 AM

Previous topic - Next topic

drewactual

In the main SMF index there is a check for compression- if zlib.outputcompression is "1", or 'on' (it looks for "1", assuming if the php.ini actually says 'On' it still reports 1 to the application?), it stops output compression output for SMF.  The selector is still, through the application the best i can determine, to be 'gzip' for the output. 

there are also other headers sent that no-sniffs, which is a good thing i don't want to mess with. --> (x-content-type, x-frame-options, x-xss protection)...

where does the application (SMF) set the header 'vary: accept-encoding, user-agent'?  Where does it set the header to accept gzip (gz) exclusively?

I'm running brotli- and it's pretty dang efficient in comparison to gzip.  I also h2 push a lot of items early, set the cache by file type, and several other somewhat related things using httpd or htaccess... I have the output set to prefer brotli (br) and the server selects br for every item outside or independent of SMF, but the files from smf still come through gzip...

where is this controlled? is the juice worth the squeeze to begin with or is this the lid to pandora's box?

Arantor

SMF doesn't set the Vary header itself, whatever else is in your web stack will do that for you.

And really, I'd be spending the time figuring out how to scale horizontally for your workload rather than vertically.

drewactual

i'm working on both- and man, is it a learning curve.  all while in production. 

i can't figure out how to have index.php (first file in delivery) compressed with br- everything else does.  well, everything else i can control (amazon, google serves gzip still).  because i can't get it served with br i can only compare other resources being served as br of similar build and size... those files a wicked fast in comparison.  tiny, too. 

i was guessing that this header was set in SMF somewhere, as it is the base of the site (top directory).  that was the only thing i could figure out... but i guess i'm wrong, and lost againagain. 

thank you for the response!


Arantor

They still use it that way for a reason: browser support is patchy. (Seriously, IE 11 isn't dead and buried, it's still supported through 2025!)

drewactual

well, i feel a lot better about not being able to do this.... turns out i'm far from the only person struggling to make it happen- we all end up in the same place.  after finding a brotli tester online and testing my own site (successfully) i decided to test others... it was confirmation that most have the same issue- the index is never BR'd, but GZip'd instead. 

i've wasted too much time on this... there are other more pressing matters. 

marked solved.

Advertisement: