Posts

Showing posts from March, 2019

Browser Request Header Referer

I was helping one of our product managers build a prototype website that was linking to all kinds of URLs using Javascript window.open. This worked fine with localhost but when we tried to access it from another machine we were getting a 403 error on one of the URLs. I then looked at the request headers in Chrome, which you can do by bringing up the Network tab in the Debugger and refreshing the page and then clicking on the URL and the click on the Headers. When we typed the actual hostname vs localhost a 'referer' was being set which was causing the 403 error. The fix for this was to add or do the following before your window.open ... var meta = document.createElement('meta'); meta.name = "referrer"; meta.content = "no-referrer"; document.getElementsByTagName('head')[0].appendChild(meta);

Java Jackson JSON serialize and deserialize

Best list of example for serializing and serializing JSON using Jackson

Learn X in Y Minutes

I used create very good notes when I learnt a new programming language or API. But with work keeping me very busy I haven't had time do that. I recently bumped into this great website which is very handy when you are trying out something basic in a new language or environment and you just want a quick example. I also love the website name. Learn X in Y Minutes