开发者

Cookie slows down my website on first start, always like this?

开发者 https://www.devze.com 2022-12-14 06:03 出处:网络
开发者_如何转开发As soon as I implemented only one cookie into my website, the entire website became very slow on first start.
开发者_如何转开发

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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消