homepage Welcome to WebmasterWorld Guest from 50.19.172.0
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Browsers / Firefox Browser Usage and Support
Forum Library, Charter, Moderators: incrediBILL

Firefox Browser Usage and Support Forum

    
Firefox not working on Facebook? Other sites?
It may be caused by your custom cookie settings
coopster

WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4540560 posted 1:01 pm on Jan 30, 2013 (gmt 0)

Firefox has a little security feature built in that won't allow localStorage (HTML5 feature) access if you have custom cookie options set. Well, being a developer I need full control over each cookie that pops so I can monitor and check values as they are get/set.

I ran into this last April after a Firefox update rendered the Facebook site half-operational and no errors being thrown. And rather than take the time to troubleshoot I uninstalled Firefox and installed a fresh, clean copy without any add-ons. Of course, I went into the custom options immediately and changed the cookie settings so I could be asked every time. If I would have left the default values Firefox would have worked on Facebook. But, since I modified the settings I found that Facebook still wasn't working. At the time I didn't realize where the issue lied so I just used my tablet when I wanted to check in at Facebook. Or a different browser. Frustrating? Oh yes, but I figured it was a Facebook code issue and left it at that.

Fast forward to a custom contract where I decided to use HTML5 localStorage (http://dev.w3.org/html5/webstorage/) and I kept getting errors when testing in my browser. Armed with my new keyword (localStorage) I did an internet search and came across a bug report as well as a blog post, both authored by Eric Meyer:

https://bugzilla.mozilla.org/show_bug.cgi?id=748620
[meyerweb.com...]

Turns out that Meyer ran into the problem about the same time I did but he took the time to figure out what was going on.

So, I waited way too long to post this in a Firefox browser forum but figured it should be laid out for others who are either
  1. Using Firefox for web browsing
  2. Using Firefox for development and testing


Oh, one last thing for developers. You can wrap your attempt at using localStorage in a try/catch block and handle accordingly. The Gecko docs have an example workaround handler or if you are using Modernizr you can load one of the polyfills from there instead. This is by no means a working solution but it should get you started in the proper direction if you find yourself in the same situation:


try {
localStorage.foo = localStorage.foo == 'undefined'
? 'true'
: localStorage.foo
;
} catch (e) {
// set your own handler or use a polyfill:
// https://developer.mozilla.org/en-US/docs/DOM/Storage OR
// https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills
}

 

lucy24

WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4540560 posted 8:08 am on Mar 20, 2013 (gmt 0)

The basic problem is, every newfangled “try code out for yourself” site I hit is just failing in Firefox 11 and 12.

This was written less than a year ago. So how many FF versions are we talking about?

“Just change your cookie policy” is the new “use a different browser” (which is the new “get a better OS”) and it ain’t gonna fly here.


:: snrk ::

coopster

WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4540560 posted 4:17 pm on Apr 16, 2013 (gmt 0)

I received an update just this morning, looks like the targeted patch milestone is set for mozilla23, or at least that's the plan:

https://bugzilla.mozilla.org/show_bug.cgi?id=600307#c216

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Firefox Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved