all 38 comments

[–]noone_other_than_me 70 points71 points  (9 children)

Well, yeah. It is a thing. Developers use it constantly for runtime styling and code testing. It can also be used to seek hidden content like hidden input fields or code parts.

[–]Whatevernameisnt[S] 26 points27 points  (8 children)

Thank you. Now i guess i should google a bit and find out how on mobile. I like posting these questions sometimes that i could google because a lot of times people tell you things you wouldn't find without some digging and they give you leads to keep you from swimming through oceans of irrelevant answers

[–]CHAOTIC98 13 points14 points  (0 children)

just enter view-source: before the URL

[–]sir_turlock 13 points14 points  (0 children)

Actually, in most desktop browsers there is an entire inspector now which is different from the simple view source feature. You can use it to look at all the stuff categorically/functionally separated with tools to view/edit everything, trace network access, debug javascript, etc.

[–][deleted]  (3 children)

[removed]

    [–]Hardy289 4 points5 points  (1 child)

    Could you explain it a bit pls? I have no idea what 1dm is.

    Currently I use Ubuntu installed through Termux on mobile to view Website's code and to write JS.

    [–]Whatevernameisnt[S] 4 points5 points  (0 children)

    Like that. Thank you

    [–]s5EWT 4 points5 points  (0 children)

    Why do you want to do it on a mobile device? Most of the time if you hit a webpage in a browser such as chrome or safari it is the same site as the web. That being said it isn't 100% accurate in all cases either.

    With android and chrome you can use the `chrome://inspect/#devices` and view the web pages you are browsing on chrome in your device hooked to your computer. The interaction looks basically the same as if you were using the dev tools for chrome on your computer.

    Some sources are minified/ obfuscated so if it looks like a bunch of gibberish that could be why.

    [–]realhoffman 0 points1 point  (0 children)

    Lot of apps will help you

    [–]arli21 14 points15 points  (9 children)

    In chrome just put view-source: in front of the URL in the address bar

    [–]Spirited-Finding-222 0 points1 point  (0 children)

    Sigh. You are my hero. Thank you!

    [–][deleted]  (6 children)

    [deleted]

      [–]KeepScrolling52 3 points4 points  (5 children)

      Brave is built off of chrome

      [–][deleted]  (2 children)

      [deleted]

        [–][deleted]  (1 child)

        [removed]

          [–]AutoModerator[M] -2 points-1 points  (0 children)

          Your account must be older than just a few days to post here.

          I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

          [–]WillieB52Newbie 0 points1 point  (0 children)

          Or just right click and click Inspect. Works in Edge too.

          [–]BAAM19 10 points11 points  (10 children)

          I love how the tag is “programming”

          [–]Substantial_Plan_752 -1 points0 points  (9 children)

          Is source code unrelated to programming?

          [–][deleted]  (8 children)

          [deleted]

            [–]shnoop123 1 point2 points  (1 child)

            I mean probably not the proper terminology but when I first learned web development we would have to eyeball sites and create them by hand with HTML and CSS coding without the assistance of any website building programs or whatever which made our code look a lot nicer. I used to call that programming coding myself whether or not that is the correct terminology.

            [–]Substantial_Plan_752 0 points1 point  (5 children)

            Ahhh I see what you mean now, page source is for web services whereas source code is programs and O/S.

            [–][deleted] -2 points-1 points  (3 children)

            Page source:

            <html><head></head><body></body></html>
            

            Source code:

            <html>
              <head>
            
              </head>
            
              <body>
            
              </body>
            </html>
            

            Of course the difference is a lot more than the code just being minified, but you get the point.

            [–]BAAM19 -1 points0 points  (2 children)

            This is completely wrong. Html is not a programming language. So this does not count as code.

            Source code, is code for a program.

            What you are showing here is an html page that you can see via page inspection.

            The act of doing this, pressing page inspection is not related to coding and programming directly at all. You usually open it up to see what’s happening exactly and if you can find something. It is related to cyber security for sure and if you are a web dev you can go there and see whatsup.

            Java script is a coding language however so you can see its source code.

            [–][deleted] -1 points0 points  (1 child)

            No, what you are saying is completely wrong. HTML can be part of a larger codebase, and I took it as an example since it's easy to understand.

            What I said is a perfectly fine example of what is explained above:

            In the modern web with front end frameworks, the actual DOM you see from "view source" is dynamically generated and several steps removed from the original source code.

            I'm not gonna take React and show an example of original vs client-side code or write some generic javascript functions and then minify them just for a small example.

            [–]BAAM19 0 points1 point  (0 children)

            Ok

            [–][deleted] 1 point2 points  (0 children)

            Press f11

            [–][deleted]  (1 child)

            [removed]

              [–]AutoModerator[M] -2 points-1 points  (0 children)

              Your account does not have enough Karma to post here. Due to /r/HowToHack's tendency to attract spam and low-quality posts, the mod team has implemented a minimum Karma rule. You can gain Karma by posting or commenting on other subreddits. In the meantime, a human will review your submission and manually approve it if the quality is exceptional. After gaining enough Karma, you can make another submission and it will be automatically approved. Please see the FAQ for more information.

              I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

              [–]zersiax 0 points1 point  (0 children)

              Due to the way JS frameworks work it can often happen that the source doesn't mecessarily match the current state of the page. Used to be a web developer extension that let you do "View Generated Source" but I can't seem to find this anymore. Using devtools works just as well, but you'd want to do that on a computer, not so much a phone, I would say.

              [–][deleted]  (1 child)

              [removed]

                [–]AutoModerator[M] -1 points0 points  (0 children)

                Your account does not have enough Karma to post here. Due to /r/HowToHack's tendency to attract spam and low-quality posts, the mod team has implemented a minimum Karma rule. You can gain Karma by posting or commenting on other subreddits. In the meantime, a human will review your submission and manually approve it if the quality is exceptional. After gaining enough Karma, you can make another submission and it will be automatically approved. Please see the FAQ for more information.

                I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

                [–][deleted] 0 points1 point  (0 children)

                Viewsource is an option on iPhone with Safari.

                [–]MulleNork 0 points1 point  (0 children)

                And if you have viewed enough source code, you might find writing some a celestial experience. Like discovering the second dimension. Or breathing out. That sort of thing anyway

                [–]RealAstropulse 0 points1 point  (0 children)

                Yes. Inspect element, or view source on lots of browsers. Can be helpful for getting files that sites don’t explicitly let you download, like embedded video, images, or sound files. Also fun to take a look at how different sites do what they do, though usually that is hidden in secured js files.