Hello. On two sites we developed, both Drupal 7, Panels for front page, Views Slideshows for teasers on front page, if the setting "Force redirect if cookie is not set." is on, the site will not load properly in Safari and Mobile Safari. It will load partly, stop, reload, stop, reload, in an almost infinite loop. Once this option is switched OFF, the site loads normally in Safari. No problems in other browsers though.

Anyone experienced similar? What exactly does this option do in detail?

Comments

attiks’s picture

The option is added so you can force the browser to set a cookie containing the screen width, it's an experimental feature and should not be used in production (it's disabled by default).

In short the javascript code does the following:
checks if resp_img is set
if not check if cookie can be set
if so set the resp_img cookie and reload the page

    if (Drupal.settings.respImg.current_suffix === false && Drupal.settings.respImg.forceRedirect == "1") {
      // Make sure browser accepts cookies
      $.cookie('respimg_test', 'ok');
      if ($.cookie('respimg_test') === 'ok') {
        $.cookie('respimg_test', null);
        var suffix = Drupal.respImg_getOptimalSuffix();
        location.replace(location.href);
      }
    }

I heard before that safari can give problems with cookies, so if you can give more information we might be able to debug this.

attiks’s picture

Status: Active » Postponed (maintainer needs more info)

@gateone any chance you can debug this and see if the cookie gets set/passed?

attiks’s picture

Assigned: Unassigned » Jelle_S
Status: Postponed (maintainer needs more info) » Active
Jelle_S’s picture

Using Safari 5.1.7 everything works as expected.
Could you make sure that in Preferences > Privacy Block cookies is not set to "Always"?

Jelle_S’s picture

Status: Active » Fixed

We forgot to do a check if cookies are supported or not somewhere else. Fixed in the latest dev version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.