What's new
Apple iPad Forum 🍎

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How do I view page source in Safari?

ardchoille

iPF Novice
Joined
Apr 21, 2012
Messages
1,471
Reaction score
446
While surfing the web on my iPad mini I came across a few sites that look great. I'd like to view the page source of the site so I can learn how some of the page elements were done, particularly the CSS. This would help me improve my own website.

Is there a way to view page source in Safari on the iPad mini?
 

twerppoet

iPad Fan
Joined
Jan 8, 2011
Messages
24,269
Reaction score
15,774
Location
Milton-Freewater, OR
No way to do it in Safari.

The Atomic web browser is fairly cheap (99 cents), and will let you view the page source. There is a free, lite, version as well. I don't know if that feature is included, but probably. So you can test it and see if it's what you need.

All you need to do is copy the URL when you see a page you are interested in and then paste it into Atomic.

As a bonus, Atomic can change it's browser ID. That means website can be fooled into thinking that it is a desktop browser. Useful for when you want to bypass a mobile site that offers no link to the desktop version. Hold in mind that the desktop version may not work well, which is the normal reason to not offer the site, but in your case you may want to be able to see it and see the source anyway.

I'm sure there are other third party browsers that will view the source; however, it is the only one I have that does it, or does it easily enough that I did not need to dig into settings to find the option.
 
OP
A

ardchoille

iPF Novice
Joined
Apr 21, 2012
Messages
1,471
Reaction score
446
No way to do it in Safari.

The Atomic web browser is fairly cheap (99 cents), and will let you view the page source. There is a free, lite, version as well. I don't know if that feature is included, but probably. So you can test it and see if it's what you need.

All you need to do is copy the URL when you see a page you are interested in and then paste it into Atomic.

As a bonus, Atomic can change it's browser ID. That means website can be fooled into thinking that it is a desktop browser. Useful for when you want to bypass a mobile site that offers no link to the desktop version. Hold in mind that the desktop version may not work well, which is the normal reason to not offer the site, but in your case you may want to be able to see it and see the source anyway.

I'm sure there are other third party browsers that will view the source; however, it is the only one I have that does it, or does it easily enough that I did not need to dig into settings to find the option.

Thank you for that info. I have seen others here recommend Atomic Browser for different reasons so I am going to try it.
 
OP
A

ardchoille

iPF Novice
Joined
Apr 21, 2012
Messages
1,471
Reaction score
446
I mostly use Safari, but I keep a few other's with specialty features, just in case.

Very good practice!

I just installed the lite version of Atomic Browser and was blown away at the huge feature set. So, I uninstalled it and bought the paid version - it's one of those apps that's so good I jumped at the chance to support the developer. Thank you so much for recommending this wonderful browser.. solved my problem :)
 

DarkRavenMoon

iPF Noob
Joined
Dec 26, 2011
Messages
50
Reaction score
7
Want to view the source code of a web page in mobile Safari on your iDevice?

Bookmark any page then edit it, name it 'View Source' and change the address to this:

javascript:(function(){var a=window.open('about:blank').document;a.write('Source of '+location.href+'');a.close();var b=a.body.appendChild(a.createElement('pre'));b.style.overflow='auto';b.style.whiteSpace='pre-wrap';b.appendChild(a.createTextNode(document.documentElement.innerHTML))})();

Damn emoticons! Sub the :( for a : and a (

1. Open Safari.
6y5y6eba.jpg


2. Go to any web page (google as an example).
ybedaqy9.jpg


3. Once there add the page as a bookmark.
saha4y3u.jpg


3a.
7y6u5ume.jpg


3b.
me3uzyda.jpg


4. Rename the page to 'View Source' and save it.
uqape7uh.jpg


4a. So it looks like this.
sygu7y3e.jpg


5. Tap 'Edit'.
a5y4ezys.jpg


6. Select the bookmark you renamed earlier so that you can edit the address.
regenuby.jpg


7. Remove the address and paste the JavaScript from the top of my post.
ugubyzuh.jpg


All done ;) So, now no matter which web page you are viewing you can simply select 'View Source' from your bookmarks and the source code will open in a new window :)

Enjoy
 
Last edited:

DarkRavenMoon

iPF Noob
Joined
Dec 26, 2011
Messages
50
Reaction score
7
No, never bothered looking as I use the above hehe

PS
Added screen grabs to my last post to help describe it a little easier.

Hope it helps someone.
 

DarkRavenMoon

iPF Noob
Joined
Dec 26, 2011
Messages
50
Reaction score
7
Ah ok thanks :) I misread your post. I thought you said, "Did you know there was.."

Not up on the buzz words I guess lol
 

DarkRavenMoon

iPF Noob
Joined
Dec 26, 2011
Messages
50
Reaction score
7
I've posted a link to this thread on there - thanks for the heads up on the other bookmarklets ;)
 

KevinJS

Super Moderator
Staff member
Joined
Aug 6, 2011
Messages
10,698
Reaction score
1,547
Location
Edmonton AB Canada
You can disable emoticons in posts if you use the website view of iPF. It's in the list of options under the posting window.

Sent from my iPad using iPF
 

DarkRavenMoon

iPF Noob
Joined
Dec 26, 2011
Messages
50
Reaction score
7
I only get these:
ahevemyd.jpg
 

Attachments

  • ImageUploadedByTapatalk1355258164.417855.jpg
    ImageUploadedByTapatalk1355258164.417855.jpg
    23.1 KB · Views: 265

Most reactions

Latest posts

Top