views:

41

answers:

2

As soon as I implemented only one cookie into my website, the entire website became very slow on first start.

I guess it's because it is fetching the cookie information. But is this always the case?

There is no heavy code behind fetching the cookie, just plain simple php like this:

  $arr = $_COOKIE['name']; // array maximum of 10 values
  one for loop and nothing else!

Should I be worried?

With slows down, I mean like loading for 3-5 seconds.

Thanks

+1  A: 

This is always the case for the first time. For the second time, browser gets stuff from it's internal cache and temporary files.

Sarfraz
A: 

Retrieving a cookie shouldn't slow your site. Something else is going on. You'll need to do some profiling.

Jeremy Stein