{"id":17,"date":"2011-04-22T09:02:00","date_gmt":"2011-04-22T09:02:00","guid":{"rendered":"http:\/\/mattdturner.com\/wordpress\/?p=17"},"modified":"2011-04-26T14:14:40","modified_gmt":"2011-04-26T20:14:40","slug":"how-to-view-html-source-code-on-ios-ipad-iphone-ipod","status":"publish","type":"post","link":"https:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/","title":{"rendered":"How to View HTML Source Code on iOS | iPad, iPhone, iPod"},"content":{"rendered":"<p>Occasionally, when browsing the web I have a need to view the source code for a certain page. \u00a0However, there is no intrinsic way to do so on the iOS version of safari. \u00a0Well, using some simple javascript bookmark you can view the source code for any webpage.<\/p>\n<p>To view the source code, follow the below instructions:<\/p>\n<ol>\n<li>Open Safari (duh!)<\/li>\n<li>Click the &#8220;Add Bookmark&#8221; button in Safari.<\/li>\n<li>Give the bookmark whatever name you wish; I chose the title &#8220;View Source&#8221;.<\/li>\n<li>In the address bar of your new bookmark, paste the following code:\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\"> javascript:var%20sourceWindow%20%3D%20window.open%28%27about%3Ablank%27%29%3B\r\n%20%0Avar%20newDoc%20%3D%20sourceWindow.document%3B%20%0AnewDoc.open%28%29%3B\r\n%20%0AnewDoc.write%28%27%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20%27%20%2B\r\n%20document.location.href%20%2B%20%27%3C\/title%3E%3C\/head%3E%3Cbody%3E%3C\/body\r\n%3E%3C\/html%3E%27%29%3B%20%0AnewDoc.close%28%29%3B%20%0Avar%20pre%20%3D\r\n%20newDoc.body.appendChild%28newDoc.createElement%28%22pre%22%29%29%3B%20\r\n%0Apre.appendChild%28newDoc.createTextNode%28document.documentElement.innerHTML\r\n%29%29%3B<\/pre>\n<\/li>\n<li>Now just navigate to whichever page you wish to view the source of, click the bookmarks button, and select your new View Source bookmark.<\/li>\n<\/ol>\n<div><strong>NOTE:<\/strong> The entire code should be on a single line.  I did not create this javascript bookmark. \u00a0I only discovered it while browsing the internet. \u00a0For the source of the javascript bookmark, please see <a href=\"http:\/\/banagale.com\/view-source-from-safari-on-ipad.htm\">Rob&#8217;s Blog<\/a>.<\/div>\n<div class=\"zemanta-pixie\" style=\"margin-top: 10px; height: 15px;\"><a class=\"zemanta-pixie-a\" title=\"Enhanced by Zemanta\" href=\"http:\/\/www.zemanta.com\/\"><img decoding=\"async\" class=\"zemanta-pixie-img\" style=\"border: none; float: right;\" src=\"http:\/\/img.zemanta.com\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732\" alt=\"Enhanced by Zemanta\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Occasionally, when browsing the web I have a need to view the source code for a certain page. \u00a0However, there is no intrinsic way to do so on the iOS version of safari. \u00a0Well, using some simple javascript bookmark you can view the source code for any webpage. To view the source code, follow the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4,5],"tags":[56,17,8,40,7,53,55,23],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-ipad","category-iphone","tag-android","tag-apple","tag-ios","tag-ipad-2","tag-iphone-2","tag-javascript","tag-safari-web-browser","tag-source-code","no-thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to View HTML Source Code on iOS | iPad, iPhone, iPod - Tech N Comp<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to View HTML Source Code on iOS | iPad, iPhone, iPod - Tech N Comp\" \/>\n<meta property=\"og:description\" content=\"Occasionally, when browsing the web I have a need to view the source code for a certain page. \u00a0However, there is no intrinsic way to do so on the iOS version of safari. \u00a0Well, using some simple javascript bookmark you can view the source code for any webpage. To view the source code, follow the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech N Comp\" \/>\n<meta property=\"article:published_time\" content=\"2011-04-22T09:02:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2011-04-26T20:14:40+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/img.zemanta.com\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732\" \/>\n<meta name=\"author\" content=\"Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/\"},\"author\":{\"name\":\"Admin\",\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/ddfa8276a3c382cc0a217b9cba226f28\"},\"headline\":\"How to View HTML Source Code on iOS | iPad, iPhone, iPod\",\"datePublished\":\"2011-04-22T09:02:00+00:00\",\"dateModified\":\"2011-04-26T20:14:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/\"},\"wordCount\":235,\"commentCount\":10,\"image\":{\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/img.zemanta.com\\\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732\",\"keywords\":[\"Android\",\"Apple\",\"ios\",\"ipad\",\"iphone\",\"JavaScript\",\"Safari (web browser)\",\"Source code\"],\"articleSection\":[\"iPad\",\"iPhone\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/\",\"url\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/\",\"name\":\"How to View HTML Source Code on iOS | iPad, iPhone, iPod - Tech N Comp\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/img.zemanta.com\\\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732\",\"datePublished\":\"2011-04-22T09:02:00+00:00\",\"dateModified\":\"2011-04-26T20:14:40+00:00\",\"author\":{\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/ddfa8276a3c382cc0a217b9cba226f28\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/2011\\\/04\\\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\\\/#primaryimage\",\"url\":\"http:\\\/\\\/img.zemanta.com\\\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732\",\"contentUrl\":\"http:\\\/\\\/img.zemanta.com\\\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732\"},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/#website\",\"url\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/\",\"name\":\"Tech N Comp\",\"description\":\"The one stop shop for everything Technology and Computer Related\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/mattdturner.com\\\/wordpress\\\/#\\\/schema\\\/person\\\/ddfa8276a3c382cc0a217b9cba226f28\",\"name\":\"Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f908010f32d1c51d493f0c45d4ecaadcc12862723680f7d4ff73e7619d611855?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f908010f32d1c51d493f0c45d4ecaadcc12862723680f7d4ff73e7619d611855?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f908010f32d1c51d493f0c45d4ecaadcc12862723680f7d4ff73e7619d611855?s=96&r=g\",\"caption\":\"Admin\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to View HTML Source Code on iOS | iPad, iPhone, iPod - Tech N Comp","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/","og_locale":"en_US","og_type":"article","og_title":"How to View HTML Source Code on iOS | iPad, iPhone, iPod - Tech N Comp","og_description":"Occasionally, when browsing the web I have a need to view the source code for a certain page. \u00a0However, there is no intrinsic way to do so on the iOS version of safari. \u00a0Well, using some simple javascript bookmark you can view the source code for any webpage. To view the source code, follow the [&hellip;]","og_url":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/","og_site_name":"Tech N Comp","article_published_time":"2011-04-22T09:02:00+00:00","article_modified_time":"2011-04-26T20:14:40+00:00","og_image":[{"url":"http:\/\/img.zemanta.com\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732","type":"","width":"","height":""}],"author":"Admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/#article","isPartOf":{"@id":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/"},"author":{"name":"Admin","@id":"http:\/\/mattdturner.com\/wordpress\/#\/schema\/person\/ddfa8276a3c382cc0a217b9cba226f28"},"headline":"How to View HTML Source Code on iOS | iPad, iPhone, iPod","datePublished":"2011-04-22T09:02:00+00:00","dateModified":"2011-04-26T20:14:40+00:00","mainEntityOfPage":{"@id":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/"},"wordCount":235,"commentCount":10,"image":{"@id":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/#primaryimage"},"thumbnailUrl":"http:\/\/img.zemanta.com\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732","keywords":["Android","Apple","ios","ipad","iphone","JavaScript","Safari (web browser)","Source code"],"articleSection":["iPad","iPhone"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/","url":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/","name":"How to View HTML Source Code on iOS | iPad, iPhone, iPod - Tech N Comp","isPartOf":{"@id":"http:\/\/mattdturner.com\/wordpress\/#website"},"primaryImageOfPage":{"@id":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/#primaryimage"},"image":{"@id":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/#primaryimage"},"thumbnailUrl":"http:\/\/img.zemanta.com\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732","datePublished":"2011-04-22T09:02:00+00:00","dateModified":"2011-04-26T20:14:40+00:00","author":{"@id":"http:\/\/mattdturner.com\/wordpress\/#\/schema\/person\/ddfa8276a3c382cc0a217b9cba226f28"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/how-to-view-html-source-code-on-ios-ipad-iphone-ipod\/#primaryimage","url":"http:\/\/img.zemanta.com\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732","contentUrl":"http:\/\/img.zemanta.com\/zemified_e.png?x-id=141ca648-4cb9-40d9-a890-65a8cede9732"},{"@type":"WebSite","@id":"http:\/\/mattdturner.com\/wordpress\/#website","url":"http:\/\/mattdturner.com\/wordpress\/","name":"Tech N Comp","description":"The one stop shop for everything Technology and Computer Related","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/mattdturner.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/mattdturner.com\/wordpress\/#\/schema\/person\/ddfa8276a3c382cc0a217b9cba226f28","name":"Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f908010f32d1c51d493f0c45d4ecaadcc12862723680f7d4ff73e7619d611855?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f908010f32d1c51d493f0c45d4ecaadcc12862723680f7d4ff73e7619d611855?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f908010f32d1c51d493f0c45d4ecaadcc12862723680f7d4ff73e7619d611855?s=96&r=g","caption":"Admin"}}]}},"_links":{"self":[{"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":3,"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":68,"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/posts\/17\/revisions\/68"}],"wp:attachment":[{"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}