htaccess otimizado para pagespeed

#########################################################
#----------------- P A G E S P E E D -------------------#
#########################################################
# Our server has PageSpeed installed on it. Which makes our life optimised. Seriously optimised too.
# I've got a bunch of things you can add to your site below. Comment out what you don't want.
# I've tested out a bunch of this stuff, if anything doesn't work, flag it up and let me know asap.

# Turn on PageSpeed + It's Candy
ModPagespeed on

# Make javascript the last thing the page loads
ModPagespeedEnableFilters defer_javascript

# Fuck knows what this really does, but it's supposed to load the needed CSS first
ModPagespeedEnableFilters prioritize_critical_css

# This combines all the CSS into one glorious file.
ModPagespeedEnableFilters combine_css

# Puts all javascript inline = 0 requests
ModPagespeedEnableFilters inline_javascript

# Remove all comments. Incase people are reading. The bastards.
ModPagespeedEnableFilters remove_comments

#########################################################
#-------------------- I M A G E S ----------------------#
#########################################################

# Responsive images? Fuck yes.
# This is is where we start cutting out all the fat with images and mobile devices.
# Some of these things overwrite themselves, but fuck it, they work just fine.

# Optimise all images that are inline. This can save some dollar when loading a blog
ModPagespeedEnableFilters rewrite_images

# This addes width=x height=x to all img tags
ModPagespeedEnableFilters insert_image_dimensions

# Make images inline
ModPagespeedEnableFilters inline_images

# Super Compress your images. 60 = Meh
ModPagespeedJpegRecompressionQuality 60

# Super Compress your images for mobile. Serious Quality loss. SERIOUS.
# 20 = Shit image. 35 = mehhh, But on mobile it's fine
ModPagespeedJpegRecompressionQualityForSmallScreens 35

# Make images smaller physically
ModPagespeedEnableFilters inline_preview_images

# Load these smaller images on mobile devices
ModPagespeedEnableFilters resize_mobile_images

# Stip out all meta details
ModPagespeedEnableFilters strip_image_meta_data
#########################################################
#------------------ F E A T U R E S --------------------#
#########################################################

# Only loads images that you can see in viewport, then loads as you scroll
ModPagespeedEnableFilters lazyload_images

Comentários

Postagens mais visitadas deste blog

SPAM de hacker pedindo bitcoin