Taking a peek inside __VIEWSTATE

by on February 13, 2014


If you’ve ever viewed-source on a website that uses Microsoft technology like ASP or .NET, you may have noticed a massive blob of unintelligible text stored in a input field called __VIEWSTATE. What you’re seeing is actually a bunch of Base64 encoded data that gets passed back and forth between the server and the client. I don’t understand how anyone ever thought this was a good idea, but there are a ton of sites that still use this technique. Just check out some old enterprise applications or any Microsoft website and you’ll see what I mean. The United and US Airways websites are a couple other good examples. Unless the __VIEWSTATE is encrypted, you’ll be able to take a look inside using this simple bookmarklet:

javascript:xmp=document.createElement("xmp");
txt=document.createTextNode(atob(document.getElementsByName("__VIEWSTATE")[0].value));
xmp.appendChild(txt);
document.body.insertBefore(xmp,document.body.firstChild);

Drag this link to your toolbar to try it: Decode ViewState

Pinterest’s 25 edge cases

by Josh Fraser on August 13, 2013


I was snooping around the JavaScript that Pinterest uses for their "Pin It" button. No real reason. I'm just nosy. Most of the code is what you would expect, but what jumped out at me were the 25 websites that get special treatment. In fact, ...

The big choices in life

by Josh Fraser on July 31, 2013


A great quote from Steve Jobs: Remembering that I'll be dead soon is the most important tool I've ever encountered to help me make the big choices in life. Almost everything--all external expectations, all pride, all fear of embarrassment or failure--these ...

Lest we forget…

by Josh Fraser on June 20, 2013


The United States Bill of Rights is a remarkable document. Our founding fathers had incredible foresight about the need to limit the power of government and protect our rights of liberty. In recent years, many of these amendments have been under attack ...

Update on a few of my open source projects

by Josh Fraser on June 4, 2013


I've been trying to do some cleanup and reorganization of my various open source projects. I regularly get emails asking for help or gently reminding me that one of my projects needs updating. The truth is, most of my projects have been horribly neglected ...

Learn to code

by Josh Fraser on February 26, 2013


The team at code.org published a terrific video encouraging people to learn to code. It features some of the biggest names in our industry and it does a great job at explaining why programming skills are so important in this day and age. They want ...

Broken business models

by Josh Fraser on February 25, 2013


Insurance companies make more money when they deny your claim. As publicly traded companies they have a fiduciary responsibility to maximize profits. It's no surprise that customers get screwed. Food companies make more money by making food less ...

Edge cases

by Josh Fraser on January 6, 2013


A few months ago, the parking garage at the San Jose airport ate my credit card. There was noone at the exit so I parked and went hunting for someone who could help me. When I finally found someone, they kindly ejected my card and explained that their ...

The future of mobile

by Josh Fraser on December 6, 2012


I've been quite intrigued by the conversation that's been developing about the future of mobile. It started with Fred Wilson's post about Rethinking Mobile First. As usual, I have my own opinions on the topic. Here's what I posted in the comments ...

Storytelling

by Josh Fraser on November 6, 2012


When selling, it helps to tell a story. A story that resonates. A story that is believable. A story that is easy to share. Don't just tell me what you're offering. Tell me why you're different. Shane Company does a fantastic job at this. Their ...