I need to make my website faster on the client side. I wonder if my excessive Javascript cookie manipulation could slow down the browser. It uses the harddrive, which is the slowest component of a computer. On a severely fragmented harddrive, could cookie manipulation freeze the browser?
Is JS doing any optimizations for cookie writing/reading (caching, etc..). Could I exploit these optimizations to improve my site?
Replacing client-side cookies with a server side database is out of the question because my servers are overloaded already.
JavaScript can create, read, and delete cookies with the document.
Cookie data stacks up pretty quickly, taking up browser memory space. The cache stores your data from websites so the pages load faster on future visits.
HTTP Cookies are not a feature of PHP, nor a feature of Javascript : those are just programming languages that allow a developper to manipulate them. The biggest difference between JS and PHP is that : Javascript runs on the client side. PHP runs on the server side.
A cookie is an amount of information that persists between a server-side and a client-side. A web browser stores this information at the time of browsing. A cookie contains the information as a string generally in the form of a name-value pair separated by semi-colons.
There are a few ways you can speed up your page on the client side, although I'm guessing reducing cookie use would only save a few microseconds at best. Just in general make sure you are only saving what you need.
There are tons of other optimizations that you can do though, such as:
These are all proven methods of reducing page load times.
For more information on how to make your page load faster, get the YSlow! plugin for firefox / firebug http://developer.yahoo.com/yslow/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With