Fix Internet Explorer prompts to save JSON response when uploading files

When you upload a file using AJAX and then reply using a JSON response, Internet Explorer decides to interpret the response as something to download to disk or open. In essence, it interjects in between the Ajax post response and turns the response into a standard IE file download.

To resolve this I looked at the HTTP headers from two posts made by IE. The first is the post with a file:

The response to this looks like this:

And then the second without a file, using a standard Ajax post:

With the resulting response:

In order to fix the problem I needed to change the content type of the response. Internet Explorer isn’t accepting application/json, and that is what ASP.NET MVC is sending back by default. A quick fix is to override the JsonResult in the base controller:

We now get text/plain back for browsers (IE) that aren’t ready to accept application/json. Problem solved.

Are iPads bad for young children?

It is hard to find an expert who thinks that monitored and considered tablet use is harmful. Even Richard Graham, the doctor who was reported to have treated the four-year-old patient for iPad addiction, does not think tablets are bad for children. Graham, lead consultant for technology addiction at the Capio Nightingale hospital in London, says that that “case”, so eagerly taken up by the tabloids, comprised a single informal phone call with a parent, in which he gave advice. There was no followup treatment. He doesn’t believe that “addiction” is a suitable word to use of such young children.

The difficulty for parents is that the dangers of tablet use for children – if dangers exist – are as yet unidentified. Research is in its infancy. We know little about what is going on in a child’s head while they are using a tablet. “Really not very much at all at this point,” says Kaufman (his BabyLab plans to publish research in the spring). This is partly because it is hard to measure brain activity in someone who is moving, and partly because metal cannot be taken into an MRI scanner. Until we know more, parents can only follow their own parenting instincts. “There is a school of thought that tablet use is rewiring children’s brains, so to speak, to make it difficult for them to attend to slower-paced information,” says Kaufman. Then he adds: “But every thought we have rewires the brain in some way.”

Tablets are designed to mirror the world we know. They appear to operate intuitively, mimetically, responding to, reflecting and re-presenting the user’s touch. Might the way tablets translate our sense of touch create a particularly intense relationship between user and technology?

Rosie Flewitt, of the Institute of Education at the University of London, has published research on how iPads can support literacy in nursery, early primary and special education. She has just submitted a study, looking at tablet use in the light of recent research into mirror neurons, to an Australian journal for peer approval. As part of her research she observed tablet use in a special school, where the children were writing stories and producing book covers on an iPad. “It was a form of mastery for those individuals that hadn’t previously been accessible to them without a lot of help from other people,” she says. “But beyond that there was something about the activities that captivated all the children intensely and motivated them to carry on. We have been trying to puzzle out why. That sent us on a journey finding out about mirror neurons … It may be that what you see on the screen is partially powerful because of the way mirror neurons work.”

via Are iPads and tablets bad for young children? | Society | The Guardian.

When you realize youre in a hole, stop digging

At first it may be hard to stop digging, but it is the very first step. Every inch you dig now is another inch you have to climb out.

Don’t give up. Believe in yourself. You can climb out of this hole. And if you give it your all, you will climb out faster than you dug it.

via “When you realize youre in a hole, stop digging,” a Maxim written by Jerzy J. Gangi.