In the preface to my book DOM Scripting, the first of my acknowledgments is a
In these days of RESTful APIs, there are even more sources to be viewed. Whilst deconstructing a message from the oracle of Fielding, Paul gives some straightforward advice on being true to the ideals of REST, including this:
Above all, don’t kill the bookmarking experience and testing with bog-standard, service-ignorant browsers.
Replace the word “testing” with “viewing source” and that single sentence encapsulates the baseline support I expect from a web browser.
In recent years, the bookmarking aspect has been suffering not through any fault of the browsers but because of overzealous use of Ajax and through the actions of developers using POST when they should be using GET.
Equally worrying, I’ve noticed that the second piece of functionality—viewing source—is also under threat in some circumstances. Here the problem lies with the web browser, specifically Safari. Entering the URL for an RSS file, or following a hypertext reference to an RSS file, will not display the contents of that resource. Instead, Safari attempts to be “smart” and reformats the resource into a nicely presented document.
Now, I understand the reasoning for this. Most people don’t want to be confronted with a page of XML elements. But the problem with Safari’s implementation is that it breaks its own View Source functionality. Viewing source on a reformatted RSS feed in Safari will display the HTML used to present the feed, not the feed itself. Firefox 3 offers a better compromise. Like Safari, it reformats RSS feeds into a readable presentation in the browser. But crucially, if you view source, you will see the original RSS …the source.
I’ll leave you with some writings on the importance of View Source through the ages:
- 1998: View Source… Lessons from the Web’s massively parallel development by Clay Shirky.
- 2006: The Power of “View Source” by Jeff Atwood.
- 2007: The importance of View Source by Chris Messina.
Find photos that I took on January 31st, 2009.