Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Improving Website Speed
#25

Rob Wrote:It's text/javascript instead of application/x-javascript. That is probably why js isn't getting cached.

Good job. Pages seem to be pretty instant for me now.

Fun information regarding how ****ed up HTML is: http://stackoverflow.com/questions/18985...f-a-script
#26

Yeah, I think I saw that in my endless search through Google for an answer. I ended up trying to do it with the tag in the .htaccess instead and it's still ignored. Check it:

Quote:#Gzip

AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript

SetOutputFilter DEFLATE


#End Gzip

Going to try asking the peer-support forums. It could be that the method won't work in conjunction with mod_deflate.

Also, I think I'll play with some CSS sprites to see what I can do to lower the number of requests. I really like optimizing stuff. Tongue Just ask Taran about my static-management obsession.
#27

Hurray for jerry-rigging things. I ended up just compressing all the .js and .css files into their own .gz file, then adding handlers for the resulting files, along with a rewrite to use the pre-zipped ones instead. It should also lower the load on the server and be even faster than having it deflate the file every time. ;3

One liner to gzip all css and js files Wrote:find . -regex ".*\(css\|js\)$" -exec bash -c 'echo Compressing "{}" && gzip -cf --best "{}" > "{}.gz"' \;

.htaccess addition Wrote:
AddType "text/javascript" .gz
AddEncoding gzip .gz


AddType "text/css" .gz
AddEncoding gzip .gz

RewriteEngine on
#Check to see if browser can accept gzip files.
ReWriteCond %{HTTP:accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Safari
#make sure there's no trailing .gz on the url
ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$
#check to see if a .gz version of the file exists.
RewriteCond %{REQUEST_FILENAME}.gz -f
#All conditions met so add .gz to URL filename (invisibly)
RewriteRule ^(.+) $1.gz [QSA,L]
#28

Forums have been real slow for me the last day or two.
#29

Hmm, what browser you on? Also, what's your ping to in-uo.net look like?

Pages are loading in .8 seconds for me after I've loaded the pages the first time.
http://gtmetrix.com/reports/in-uo.net/3w0AarjG

I'm not seeing much else to change. Maybe I could use CSS Sprites for the forum images and work on optimizing image size for the ones that exist. But, with the expires headers and caching, that shouldn't really be affecting it very much.
#30

Eru Wrote:Hmm, what browser you on? Also, what's your ping to in-uo.net look like?

Pages are loading in .8 seconds for me after I've loaded the pages the first time.
http://gtmetrix.com/reports/in-uo.net/3w0AarjG

I'm not seeing much else to change. Maybe I could use CSS Sprites for the forum images and work on optimizing image size for the ones that exist. But, with the expires headers and caching, that shouldn't really be affecting it very much.

Weird... it seems find today. *shrug*
#31

I did a few more tricks to speed it up. Mostly I'm optimizing image sizes to make sure that they're compressed as much as possible.
Also, I got rid of all the external images like the vote buttons and moved them to load from our server instead.

Probably wont' make much difference, but it's kinda fun if you're a masochist.


Forum Jump:


Users browsing this thread: 1 Guest(s)