Development Architecture blog is designed for developers who have some troubles in their code.
This blog will be mainly on web development, though many of it's posts can be used also on software design.
I wish you nothing but the best,
IE Blocking IFrame Cookies
A company wishes to set development standards.
A company you must know how to work with.
A company we all hate to love.
A little story, if I may.
I work in a company that supply sports betting solutions for online gaming web sites. About 2 months ago we got a new client with a slightly weird request - The solution should be placed in an existing site's IFrame.
The minute I heard that request I thought to myself that the amount of problems we'll encounter will give us tremendous amount of work. But as always - The client's always right.
Three weeks ago we were almost ready for beta when our QA discovered some small issues regarding user preferences: Odds, Time Zone and Languages are not displayed correctly only on IE 7 and IE 8.
After wishing some bad things to happen to Bill, my next action was to open the HttpWatch tool IE has and locating where the cookies are being set. I saw that whenever the cookies are set as Session Cookie i all work as it should, the problem then lays with cookies that have expiration date.
Since I was responsible for deploying 3 white labels (each project is called white label) this whole process took me about 2 weeks!
So, after writing some angry emails to Microsoft (but not sending them) I started looking for someone's solution to that problem. And that it was when I encountered a very small and cute article talking about P3P or as you might know it: "Platform for Privacy Preferences (P3P) Project".
In short, unless you have some identifier in the page's header - IE wont except you third-party cookie. So you need to set the P3P header in every page you wish the cookie to appear.
I took the time to write the header addition in some languages / platforms:
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
HttpContext.Current.Response.AddHeader("p3p","CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
response = render_to_response('mytemplate.html')
response["P3P"] = 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"'
response.addHeader("P3P","CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"")
The only way to avoid the unfairness of a copyright tax that funds benefits for criminals is to decriminalize the benefit and make "piracy" legal for everyone. The public good provided by the tax then corresponds to the provision of free content for everyone. What are the advantages and disadvantages of decriminalizing piracy? Please see the following for a description of copyright tax: http://www.1729.com/ip/CopyrightLevies.html 8 Advantages and Disadvantages of Decriminalizing Privacy The intentional violation of the Copyrights Act, in relation to commercial products like music, software, and so on, is known as ‘privacy’. For instance, if you use a music recording or software without a license or make a copy of it to distribute without permission from the creator, you are violating the Copyright Act (Dorrel 2005). The main objective of copyrighting is for the creator to be able to recover all the costs he/she invested in producing the work. Thus copyrighting becomes
Split String in SQL Server. NVARCHAR and VARCHAR Split in MS SQL. For all of you there who wishes to preform a simple "split" on a varchar on nvarchar input in ms sql (sql server) this is for you: Basically, this post's gonna contain a Create Function Script which you will to execute in your server. It will also contain the simplest way to use it. There will be more examples in a different post I'll upload soon... CREATE FUNCTION dbo.Split ( @RowData nvarchar(2000), @SplitOn nvarchar(5) ) RETURNS @RtnValue table ( Id int identity(1,1), Data nvarchar(100) ) AS BEGIN Declare @Cnt int Set @Cnt = 1 While (Charindex(@SplitOn,@RowData)>0) Begin Insert Into @RtnValue (data) Select Data = ltrim(rtrim(Substring(@RowData,1,Charindex(@SplitOn,@RowData)-1))) Set @RowData = Substring(@RowData,Charindex(@SplitOn,@RowData)+1,len(@RowData)) Set @Cnt = @Cnt + 1 End