• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

refused to set unsafe header "connection"

Engaged ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

Is there a way to get this error to stop occuring in the large product view?

TOPICS
eCommerce

Views

11.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Sep 27, 2012 Sep 27, 2012

Oh, I see what you're referring to. You have that tabbed content inside the product layout, which breaks when the product is added to the cart or the grouping dropdown is changed, the product layout is reloaded with ajax, and you're attributing that to the Connection header inside the response...

This is not the case and the connection parameter inside the header has nothing to do with this. The reason for this is that because the content is fetched through ajax and the layout is reloaded the jQ

...

Votes

Translate

Translate
Mentor ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

Hey Adam,

Do you have more info for us, like where you're seeing this, which browser, on whcih URL and anything else that will help us get an idea of what this is?

Cheers,

-mario

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

This happens to me as well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

I haven't exactly figured it all out. The site is Lydona.com and it's at least in the product large view when you switch between sizes. I read an old post on the old forum that suggested to me that this isn't a new issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

I assume its this issue in a WebKit browser console (Chrome) when you make an Ajax request, such as changing the grouping option in the detail product layout. The issue is described here - http://www.sourcecoast.com/forums/site-essentials-package/ajax-anywhere/1076-refused-to-set-unsafe-h...

I believe that we are using that version of Mootools. I'll log an issue with the dev team on this.

Cheers,

-mario

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 24, 2012 Sep 24, 2012

Copy link to clipboard

Copied

So... the problem showed up again, and honestly I have no memory of why it stopped before, and I don't think I made any changes that caused it to reoccur. This breaks the functionality of the site (lydona.com) It happens in the product detail view when you make an ajax request. You can reproduce it by changing the box size of the product.

This is kind of urgent, so if anyone is willing to take the time to help me I would really appreciate it.

Thanks,

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 24, 2012 Sep 24, 2012

Copy link to clipboard

Copied

Did you read the link Mario Posted Adam?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 24, 2012 Sep 24, 2012

Copy link to clipboard

Copied

I did. The last post on that link was back in 2010, so supposedly the issue was resolved a long time ago. Whether BC is still using that version, I don't know. The last time I brought this up was in April. Also, the problem stopped for the bulk of that time, but has started up again. I don't personally use Mootools on my sites, so I can't see that I can do anything on my end.

I'd really like to know if there is a solution/work-around I can implement to solve this issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 26, 2012 Sep 26, 2012

Copy link to clipboard

Copied

Hey Adam,

I can't see this on my site. Can you please use bit.ly and provide a link to a page where you're seeing this?

Thanks!

-m

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 26, 2012 Sep 26, 2012

Copy link to clipboard

Copied

bit.ly/TEynfu

Change the product size to produce the error.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

I don't think that we have ever fixed this issue and it doesn't seem to be related to Mootools either. I found another explanation here http://stackoverflow.com/questions/7210507/ajax-post-error-refused-to-set-unsafe-header-connection and when I look at the response header it has "Connection: keep-alive" in there, which is what's causing this.

Adam, can you please explain why this is such a big issue for you and why it is so urgent to get it fixed? I'd like to know more so that I can go to the dev team and set the appropriate impact rating.

-mario

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

I don't think that stackoverflow response pertains to this since I haven't manually set the headers through my code.

This is a big deal. We are just starting this clients big season, and this problem causes confusion and a bad customer experience at the least, and at the most is a deal breaker on the sale. The error is preventing pertinent product information from being displayed to the customer when they ask for it. This is a fledgling business that can't afford to have a broken site at this time of year.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

The error is preventing pertinent product information from being displayed to the customer when they ask for it.

That error has absolutely no effect on the functioning of the site and SO post is absolutely correct on this one. By the way, you don't have access to response headers in BC.

Basically, the issue here is that when the server responds to an ajax request it should not have Connection parameter in it. The ajax call is made when you make a change inside the grouping dropdown. The response that comes back from the server has a Connection parameter in the header and Chrome throws that warning. No other browser does it. And even though Chrome shows it as error it has no effect on the site.

I will look this up in our bug logger and add a vote for it, but the issue will most likely remain low priority.

Cheers,

-mario

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

Webkit. Safari, chrome, Firefox. Same issue.

How can you say it has no effect on the site? Didn't you see it break? I'll just go tell my client they are imagining things.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

I'm starting to wonder if you are even seeing the site act-up on your end. On my end, before I change the product size everything works great. The tabs work and all the content is there. For example, I am able to see the products in the "Box Contents" tab. Afterwards, the jquery that produces the tab functionality breaks and that tab's contents never get rendered. If the customer can't see what is in the box, no sale. Urgent. Please.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

Oh, I see what you're referring to. You have that tabbed content inside the product layout, which breaks when the product is added to the cart or the grouping dropdown is changed, the product layout is reloaded with ajax, and you're attributing that to the Connection header inside the response...

This is not the case and the connection parameter inside the header has nothing to do with this. The reason for this is that because the content is fetched through ajax and the layout is reloaded the jQuery UI tabs part fo the code is not re-run and it doesn't add all those classes necessary to style those UL as tabs. You can see that in the following screenshots:

This is the code before the grouping dropdown refreshes the layout:

before grouping.jpg

After the grouping:

after grouping.jpg

Good luck!

-m

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

Thanks for redirecting my intention. You're right. I was focusing on the wrong part. What's strange is I solved that issue months ago. I even wrote my solution on the forum because I was so excited to solve it. Obviously, something somewhere changed during that time. Now I need to figure out what.

Thanks Mario! Sorry for the flash of temper.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 12, 2012 Dec 12, 2012

Copy link to clipboard

Copied

I am getting a very similar occurance. The CSS of jquey tabs is breaking on the product page when an item is added to the cart.

Where did you post your solution Adam? I would love to see it. I understand Mario's response is accurate, but I can't see if he is suggesting a solution.

On my site it appears as if the large product layout has been isolated completely, and all the links from the head struck. I have made a workaround by embedding the script links into the large product layout. This seems to fix the loss of styling when BC makes an ajax call.

http://bit.ly/T81l3J

What's weird is that I have implemented this twice before in precisely the same way, and this is the first time it has played up.

Any response on correct handling would be greatly appreciated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 07, 2013 Jan 07, 2013

Copy link to clipboard

Copied

LATEST

Hi ushanbb,

I apologize. I didn't see that you had posted here. Here's the link:

http://forums.adobe.com/message/4345298#4345298

The key is the use of .on() in jquery. I wrote that post a long time ago, and as I look at it I can see some updating/fixes I would do, but the concept is solid. It's important to understand that .on() acts on the current state of the document, not the initial Dom. That's why it works.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines