Setting cookie in iframe that is in different domain

To set a cookie in an iframe that is in a different domain than the parent site, you can use SameSite=None. These are called third- party cookies.

Here is a site where you can test this .

This works on:

  • Chrome (normal)
  • Firefox (normal and incognito)
  • Edge (normal and incognito)
  • Safari (incognito apparently)

This does not work on:

  • Chrome (incognito)
  • Safari (normal)

This is due to the blockage of third party cookies

This is toggle on Chrome incognito that if it’s disabled, the cookies will work.

For other settings on how to disable this, you can go here

Webkit also announced that third-party cookies are disabled by default from 24th of March 2020 and this will roll out eventually on every browser that uses webkit.

I also expect this to be reflected by other browsers in the near future.

If you think you can use localStorage , think again. That is also blocked when third-party cookies are blocked.

This is great news for security but what about the sites that still need this to work properly? What should iframes use to remember data when they are embedded in other domains? A friend of mine said that iframe are becoming deprecated and embedded widgets are the future.

What do you think?

Should your kid start coding?

Not long ago, most people though that programming is only for geeks that weren’t good at sports, but nowadays if you can code, you’re a rock star.

It’s fascinating to me that coding gains more ground at the same time as trends as #YOLO and #SWAG. But if I think about it, in all human history there were people at both ends of the spectrum, so it’s not something strange, but it still fascinates me.

Jeff Atwood wrote an article that talks about the fact that programming is becoming mainstream.

Look, I love programming. I also believe programming is important … in the right context, for some people. But so are a lot of skills. I would no more urge everyone to learn programming than I would urge everyone to learn plumbing. That’d be ridiculous, right?


Please don’t advocate learning to code just for the sake of learning how to code. Or worse, because of the fat paychecks. Instead, I humbly suggest that we spend our time learning how to …

  • Research voraciously, and understand how the things around us work at a basic level.
  • Communicate effectively with other human beings.

Erik Dietrich takes it a step further and he says that we should learn to recognize a process that can be automated.

Learn at least to recognize which parts of your job are a poor use of your time. After that, perhaps learn to use your ingenuity and creativity to automate using the tools that you know (such as googling for solutions, leveraging apps, etc). And, if you’ve come that far, maybe it’s time to roll up your sleeves and take the plunge into learning to code a little bit to help you along.

I agree with both of them (otherwise I wouldn’t have quoted them), but I think Erik has covered only a niche of the programming world. Sure, automation is important and to recognize when you should use it is vital, but if I were to build a game, I wouldn’t go through a lot of repetitive tasks. Automation would not be essential.

I am not a teacher, but I like working with kids and when I discovered I started telling every kid I knew about this course. For a year and a half, I tried the 20 hour intro course with about a dozen of kids. Some thought it was great, some thought it was too hard and some thought it was too easy. I figured that at the end, not a lot of them would stick with programming, but my surprise was when even the ones that loved the course, told me that they had better things to do or they didn’t have the time.

For a moment I forgot how I was when I was their age. Easily enthusiastic about a lot of things and easily distracted by others. Of course, there is a big possibility that I didn’t know how to inspire them or how to share my enthusiasm.

I only hope that my efforts started a little fire in at least one kid and that some day he would embrace this awesome passion.

To sum it all up, if you don’t know if programming is for you or your kids, ask yourself/the kids the following statements:

  1. Do you understand simple logic? – “If I’m hungry, I should eat.”
  2. Are you curious about how things work and do you try to understand them?
  3. Do you get that computers are “stupid” and you should tell them exactly what to do?
    • Me: “Computer, give a an example about how you should be very specific when asking a computer to do stuff.”
    • Computer: “??? Here are the latest videos with funny cats.”
  4. Do you want to build stuff? – “I want to build an app that notifies me every time my hamster is out of food.”

What do you guys think? Are there any questions I should add on my list?

Do you want to save the world with code?

About a year ago, I asked the following question on Reddit:

I’m a programmer who wants to build something that society needs. Any ideas?

And one developer replied:

Tons of programmers are thinking the same thing… But, as programmers, we look at things differently. We’re looking for solutions. We’re rarely looking for problems that need a solution. So, we’ll build things for stuff that didn’t really need something built. Sometimes it works, other times it doesn’t. Hard to find problems that can be ‘fixed’ by an application….. Still looking.

Ever since then I’m thinking about what he said. It’s possible that most programmers have a certain way of thinking, but I don’t think that this excludes us from empathizing with a general user. It’s true that most of the times developers build something for the mere fun of building something, but what should we do to build software with a high ROI (return of investment) and with a real impact?

Here’s a quote from John Sonmez’s book (Soft Skills) that got me thinking:

If you want to create a product, the first step should be to identify a specific audience that you want to target a solution for. You might have a general idea of what the problem you want to solve for that audience is, but in many cases it will take some research to find a common problem that’s either not being solved or isn’t being solved very well.

This showed me that from the very beginning I didn’t ask the right question on reddit.

So … what am I trying to say with all this?

In this world are countless problems that may be solved with the help of developers, only 0.26% of the entire population are developers (aprox. 18.5 mil in 2014) and I bet that less than 20% of developers contribute to open source projects. To make the matters worse, not all open source projects make a difference in the real world. If you are in the minority that contribute to open source projects and even if you’re not, wouldn’t you want your time spent developing to be meaningful or at least on something useful?

Sure, there may be cases where the work you do at your job has a real impact, but that doesn’t happen all that often. You could also give me a lecture about how almost every game/site/service/product does some good by easing some way the life of a user. But I beg you to be honest with yourself for a minute and analyse your current and past projects. What percentage of them had a real life impact?

Stop thinking that your first idea is the Holy Grail of ideas. Every time you start building something as a side project, ask yourself the following questions:

  1. Did I brainstorm at least 10 ideas and picked the best one?
  2. Have I done the proper research on this idea?
  3. Do I know at least 10 people that would use my software?
  4. Have I told them about my software and would they really use my product?
  5. Have I really thought about the impact my project will have on society?

On my death bed I would like to think that I made a difference (in good) in this world with a software that I contributed to. Just one… at least one.

Wouldn’t you?