19 November 2014

X-Frame-Options & SAMEORIGIN

Refused to display 'http://extremedev.example.com' in a frame because it is set 'X-Frame-Options' to 'SAMEORIGIN'

This is an error that can appear when you want to display a site through an iframe of another site. It will not allow for the site within the iframe to be displayed.

So what to do in this case?

There are several articles on the internet that are suggesting that you need to add some headers that will allow the display of the site through the iframe from different domains. For example: https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options

22 October 2014

Generic Method for wrapping around any code

Hey all,,
We often need to run something before some code logic and after it was executed.

As a simple example we can take the try-catch block, everybody has this in their application and is using it more then two times for sure.

What we can do in this case is to write a generic method that will allow to run our code inside a try-catch statement. This method will look like this:

public static void TryDo(Action action, ILogger logger, string messageDescription)
    catch (Exception)
        // Do some logging stuff here

05 January 2014

IE 11 first impressions

Hi all,

Several weeks ago I tried saw an update in my windows 7, it was Internet Explorer 11. I said, great, maybe this version of IE will be a good one, but unfortunately it wasn't it.

The first problems that I have encountered, even before opening IE 11 was when I tried to install it. I selected it to be installed as an update, it required other updates also, so I waited for it to download, and finally Windows says: "You need to restart windows for changes to apply". WHAAT?

Why when installing a browser I need to restart windows? Microsoft -> that is not good, not good at all.

But wait, that's not all, after I agreed with the restart, it was restarting around 15 times, with a message failure to install updates. Then finally after one hour, yes this is truth ONE hour, my desktop appeared, however unfortunately I could not start any application, I couldn't even go to control panel through the start menu.

In order to make my computer work again, I had to go to control panel through explorer, and uninstall, manually all the updates installed on that day - that was a very very long process. And guess what windows says to me after each update uninstall: "You need to restart....", Ough noooo, again???
After doing that my windows was ok again, but without IE 11, I tried above procedure several times, because I wanted to see IE 11 but it looks like it was not possible to do that on that computer, so I tried on another.

First impression about IE 11 was that there is not big difference, but then I opened Developers Tools, I was impressed, but then after starting to use it I was getting disappointed, more and more.

It was really really buggy.

The thing is that I am a developer that is working with sites that are updating HTML content a lot of times per second, which as you understand requires good rendering capabilities from browser, but also requires a good Developer Tools that can handle these changes in HTML source.

Well IE 11 Developer Tools is not good enough to handle this, so it crashed, and even after I closed Dev Tools and reopened it did not start again, so I had to close and reopen the entire browser again.

For me it was impossible to work with this browser + it was sometimes failing even on sites that are not updating the content so many times.

However there is something that I like and that is that Microsoft has finally decided to include automatic updates in this browser, which in my opinion they had to do a long time ago.

So guys, how do you like the new IE 11?


Need more? Leave comments and subscribe to my blog.