Umm! G Zip »  Show posts from    to     

Icy Phoenix


English Chit Chat - Umm! G Zip



mort [ Sun 22 Feb, 2015 04:58 ]
Post subject: Umm! G Zip
Fella's,

Is it wise to use GZip globally like "everything in ALL pages " are GZipped?

Or should it be used selectively for say pages, Or sections of pages that can be Zipped as against some pages with url re-directs where the re-direct stops working if it's GZipped?

Also, Cached pages (Cached as .html and not serialised) tend to fail if GZip is global.

So what's the best way to use/apply it? Or is there really of any value to use Gzip if the pages are cached anyway?


Informpro [ Mon 23 Feb, 2015 15:04 ]
Post subject: Re: Umm! G Zip
Yeah, gzip helps because it's less bandwidth used (which do NOT change whether the HTML is cached or not). The other solution could be to use "ETags" to tell the client the page is still fresh and should not be re-downloaded.


mort [ Tue 24 Feb, 2015 00:02 ]
Post subject: Re: Umm! G Zip
From what I've read about ETags - It may be ok for static pages like Wikipeadia but fairly irrelevant with dynamic pages where even one item may change such as 2 goes to 4 etc..

As for GZip - If I enable it globally this script below acts like JS is disabled in the browser and one gets a <noscript type of response with a popup - click here - goto - template.

Spoiler: [ Show ]


So that's pretty useless.

And I think that, that was the basis of my question - Is it better to use GZip selectively or construct the templates to work globally with GZip. And to me, the latter seems a lot of damn work when GZip will only crunch the text type scripts and not compress the images?

Like Icy P - I use a lot of nested templates, maybe it would be better NOT only for me but for IP too if the templates were not nested so that each and every one of them where applicable could be crunched.


Informpro [ Tue 24 Feb, 2015 10:01 ]
Post subject: Re: Umm! G Zip
That's not really how this works, AFAIK. You can just pass an argument for ob_start() to get gzip'd.


mort [ Tue 24 Feb, 2015 11:23 ]
Post subject: Re: Umm! G Zip
AFAIK, ob_start() must be immediately after the <?php and ob_end() must be immediately before the ?>

I did read about it all to the best of my understanding - but the emphasis if I recall was to flush headers?

So what with caching, GZip and ob_ start, flush, clean - One is more confused than ever.

I mean in the example below I can't cache the Header or the Footer because they contain stuff that shouldn't be cached.

But I cache the guts of it which is the most Database demanding to load all the games and data etc.

So what would you change there to make it as small as possible in size?

Spoiler: [ Show ]




Powered by Icy Phoenix