Skip navigation

How do you view source code in safari?

123309 Views 13 Replies Latest reply: Mar 16, 2014 12:41 AM by John Galt RSS
Steven Shmerler Level 1 Level 1 (60 points)
Currently Being Moderated
Sep 21, 2012 11:50 AM

How do you view source code in safari?

I'm sure you can. Just can't find it.

Mac Pro, Mac OS X (10.7.4), 30" Display, 22" Cinema Display
  • John Galt Level 7 Level 7 (33,110 points)
    Currently Being Moderated
    Sep 21, 2012 11:54 AM (in response to Steven Shmerler)

    Safari menu > Preferences > Advanced.

     

    Check "Show Develop menu in menu bar". Close Safari's preferences.

     

    Develop menu > Show Page Source

  • John Galt Level 7 Level 7 (33,110 points)
    Currently Being Moderated
    Sep 21, 2012 1:22 PM (in response to Steven Shmerler)

    You're welcome, and FYI if you encounter one of those ill-conceived websites that refuse to load unless you're running some version of Exploder or whatever, you will find the ability to change the "user agent" in the Develop menu also.

     

  • Chris Winkler1 Level 2 Level 2 (165 points)
    Currently Being Moderated
    Jan 7, 2013 7:23 PM (in response to John Galt)

    John Galt wrote:

     

    Safari menu > Preferences > Advanced.

     

    Check "Show Develop menu in menu bar". Close Safari's preferences.

     

    Develop menu > Show Page Source

    Thanks, but I hate that opening @ the bottom. I am not a developer, I just need to see a table so I can copy it off a suppliers website. How can I get it to open in a new window like before? It's a royal pain to find what I want, as I have to scroll sideways forever. While I like ML, there are so many changes that suck that I wish Apple never made. this is one of them. I'll use FF for my source needs.

  • John Galt Level 7 Level 7 (33,110 points)
    Currently Being Moderated
    Jan 7, 2013 8:23 PM (in response to Chris Winkler1)

    Chris Winkler1 wrote:

     

    ... How can I get it to open in a new window like before?

     

    If you ask politely and omit your rude comments, I will answer.

     

    Otherwise you can figure it out for yourself.

    MacBooks  iMacs  iPads  AirPorts, OS X Mountain Lion,  28 years Apple!
  • roadracer524 Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jan 16, 2013 12:08 PM (in response to John Galt)

    Great Tip! Thank you very much! I never knew you could change the user agent too! I was simply looking for an option to view a page's source when i came across this post.

     

    Thanks again!

     

    ~Ed

  • Rajneil Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 27, 2013 3:18 AM (in response to John Galt)

    Hey John :

     

    i would like to know details on Opening in New Window. I am just started with Mac and all the thionhs thta you indicated have been a great relief >>>>any things thta you would like to share that will be of great help using Mac !

  • tom-young Level 1 Level 1 (0 points)
    Currently Being Moderated
    Sep 11, 2013 2:53 AM (in response to Steven Shmerler)

    Is there a way of viewing the source code for a website all in one page like in the old version of Safari?

     

    I'm trying to get a facebook like button to work and for some reason all my HTML appears on a single line in the developer box thing, it makes it really hard to find what it is that I need to fix

  • davidslee101 Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 1, 2013 6:48 AM (in response to Chris Winkler1)

    Hey Chris,

     

    To find the source code of the table off that suppliers website:

     

    Go to

    "develop"

       "show page source"

     

    Then click "inspect" on the menu bar

      Then go to the place on the suppliers website where you'd like to find the code and click the section.

     

    You'll see the code highlighted in the page source menu.

     

    Hope that helps

     

    David Lee

  • Mike_Scott Level 1 Level 1 (0 points)
    Currently Being Moderated
    Mar 15, 2014 7:04 PM (in response to John Galt)

    Hi John. Forgive the naive question... You mentioned being able to change the "user agent".  Why is that important, and when might that come in handy?

     

    Thanks,

    Mike Scott

  • John Galt Level 7 Level 7 (33,110 points)
    Currently Being Moderated
    Mar 16, 2014 12:41 AM (in response to Mike_Scott)

    All that changing the User Agent accomplishes is to placate poorly written web pages that interrogate the client to determine which browser it's using. There is no reason to do that, but some pages will refuse to load unless the user agent string matches the arbitrary value it expects.

     

    Change the string to whatever it wants, and the page will obediently load having determined exactly nothing about what features the browser may or may not be capable of supporting.

     

    Read http://webaim.org/blog/user-agent-string-history/

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.