Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Speed up your website – Part 6: Cookies & Mobile

Wednesday, July 25th, 2018 by Servage

This is the sixth and last part of a simplified explanation of the “Yahoo best practices for speeding up your web site“. Read the fifth part here. The fourth part is about image related optimization.

Reduce cookie size

Basically cookies consume resources in terms of data in requests. The article “When the cookie crumbles” by Tenni Theurer and Patty Chi provide the following conclusions:

  • Don’t use unnecessary cookies. Think before storing useless data.
  • Reduce cookie size to the minimum required. It helps response times.
  • Restrict cookies to domains appropriately, so they are not affecting other subdomains unnecessarily.
  • Set appropriate expire dates, to remove cookies as early as possible with regards to their relevance.

Do not use cookies for static content

If you load a static file, like an image or a script file, the server has no use for the cookie. It’s merely extra network traffic. Create a subdomain for such components, to make cookie free transactions. I.e. use images.server.com instead of server.com.

Keep components under 25kb for mobile devices

I’m not sure the following article is still valid, but I found no other source right now. The author claims for example iPhone devices cache only components up to 25 kb uncompressed size, meaning your images, javascript files etc., should be less than that, otherwise the device will reload them on every request.

Combine components in a multipart document

Combining multiple files in one file, like attachments in a email, gives the advantage of saving expensive HTTP requests. Check if the user agent supports this, because some don’t.

I hope this series of articles helped to explain some of the steps you can take to improve the loading and speed experience for your users.

Speed up your website – Part 6: Cookies & Mobile, 4.1 out of 5 based on 7 ratings
Categories: Guides & Tutorials, Tips & Tricks

Keywords: ,

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.