diff --git a/session_cache.module b/session_cache.module
index 621f04b..8de3045 100644
--- a/session_cache.module
+++ b/session_cache.module
@@ -46,9 +46,7 @@ function session_cache_set($bin, $data) {
     case SESSION_CACHE_STORAGE_COOKIE:
       // Tell the browser to return the cookie only via HTTP or HTTPS, to any
       // path under the root of this server.
-      // Don't use "global $cookie_domain", as it may contain the invalid
-      // '.localhost'!
-      $cookie_domain = ini_get('session.cookie_domain');
+      global $cookie_domain;
       $serialized_data = ($data == NULL) ? NULL : serialize($data);
       setcookie("Drupal.session_cache.$bin", $serialized_data,
         // If no data make it a cookie that expires when the browser is closed.
