svg - Is it a good practice to enable file compression for all file types on a webserver? -


do think if practice make file compression on file types on webserver?

i going enable file compression on svg files reduce wait time downloading of font files , other text base file types , thinking if practice enable file compression on types of files or not.

does have bad effect on performance or something?

please let me know experience is.

after searching web hours, found these 2 resources:

http://www.ibm.com/developerworks/library/wa-httpcomp/

and

http://docs.oracle.com/cd/e24902_01/doc.91/e23435/enablecomp.htm

form first resource:

http compression, recommendation of http 1.1 protocol specification improved page download time

and second resource:

regular text , non-image content suited compression. text files can typically compressed 70% or more. compression can save significant bandwidth , enable faster browser response times. effect negligible in high speed lan environments, quite noticeable users on slow wan connections.

compression not recommended files compressed. partial list includes these types of files:

zip

pdf

exe

image files

compressing these file types using mod_deflate can increase size or corrupt files.

there 9 levels of compression available when using mod_deflate. difference between default level (6) , maximum compression level (9) minimal, , cost in cpu time necessary process higher compression level significant , not beneficial. reason, should use default compression level.

so here list prefer compress on server side:

*/*xml* (including application/xhtml+xml | application/xml | application/xml-dtd | image/svg+xml and...)

text/* (including text/html | text/javascript , ...)

message/* (including message/http | message/rfc822 , ...) page's code sample http://www.iis.net/configreference/system.webserver/httpcompression

application/ecmascript | application/json | application/javascript

this may useful someone.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -