- Accessories
- Meet the team
- Advertise with us
- Privacy Policy
How to view webpage source code in Safari on iPhone and Mac
Web pages are generally written in HTML (HyperText Markup Language) or comparable markup language. Web browsers have to get along with a number of web resource elements like images, scripts, stylesheet and more to show the web page. Ever wanted to view the source code of any webpage in Safari on your iPhone or Mac?
Turns out, you can easily access the HTML source code of any webpage in Safari. Once you have enabled your device, you are just a few clicks away from accessing it. Here is how it works.
How to View Source Code of a Webpage in Safari on Mac
How to enable develop mode in safari on mac.
To access the source code in Safari on your Mac, you need to first enable Develop Mode.
Step #1. Open Safari on your Mac and click on Safari → Click on Preferences.
Step #2. Next, click on the Advanced tab → Check the box next to Show Develop menu in the menu bar .
A new tab named “Develop” will now appear in the menu bar.
How to Show/View Page Source Code in Safari on Mac
There are three ways you can access page source code of a webpage.
- Just right-click on a page and select “Show Source Code”. Now, check out the source code of the page in the new window
- On the web page, you need to press the Option/Alt+Command+U keys at once
- While viewing any web page, select Develop in the Menu bar and choose “Show Source”
How to View Webpage Source Code in Safari on iPhone and iPad
There are quite a few iOS apps that let you view the source code of any webpage in Safari on your iOS device. But, I find “Source” very handy in letting you access HTML source of any web page.
How to Enable Safari Extension on your iOS device
Step #1. First off, you need to download “Source” on your iOS device . It’s priced at $0.99.
Step #2. Now, open Safari and tap on the Share button in the toolbar.
Step #3. Next, you have to scroll right to the end and tap on More.
Step #4. Now, Make sure to enable Source. Then, tap on Done at the top right corner to confirm.
Access/View Webpage Source Code in Safari on iPhone and iPad
Once you have enabled Safari extension, you can easily access the source code of any web page.
Step #1. Launch Safari on your iOS device.
Step #2. Go to any web page.
Step #3. Next, tap on the Share button.
Step #4. Now, tap on Source. Now, check out the source of the page.
Wrapping Up
Except for developers and some curious people, I don’t think many folks would show a lot of interest in viewing the complex source code of any web page. What do you say?
Jignesh Padhiyar is the co-founder of iGeeksBlog.com, who has a keen eye for news, rumors, and all the unusual stuff around Apple products. During his tight schedule, Jignesh finds some moments of respite to share side-splitting content on social media.
View all posts
🗣️ Our site is supported by our readers like you. When you purchase through our links, we earn a small commission. Read Disclaimer .
LEAVE A REPLY Cancel reply
Save my name, email, and website in this browser for the next time I comment.
Related Articles
How to install homebrew on mac m1, m2, m3 (2024 updated), how to know if someone has blocked you on imessage (2024), how to fix “cannot connect to app store” on iphone or ipad, how to fix delete key not working on mac.
Sign up for our daily newsletter
- Privacy Policy
- Advertise with Us
How to View the Source Code of a Webpage in Safari on Mac
Behind every beautiful webpage is a complex code called source code that serves the design and the functionality of that webpage to its users. Sometimes you may get curious and would like to see exactly what code builds a webpage. Viewing the source code of a webpage is possible in almost all web browsers, and the same applies to Safari for Mac.
Safari for Mac does allow you to view the source code of a webpage; however, it does not work like Chrome or Firefox. To view the source of a page in Safari you need to first unlock a hidden menu in the browser.
Here’s how to enable that menu and then see the source of a webpage using multiple ways.
View the Source Code of a Webpage in Safari on Mac
1. Launch Safari on your Mac.
2. When Safari launches, click on the “Safari” menu on the top followed by “Preferences…”
3. When the Preferences panel opens, click on the tab that says “Advanced”. It should be the last one in the menu on the top.
4. Inside the Advanced tab you should see an option that says “Show Develop menu in menu bar.”
Checkmark the box for the option, and the menu should instantly be added to the menu bar in the browser.
The Develop menu is now unlocked in Safari on your Mac. Here’s how you can use various options it gives you to access the source code of a webpage.
1. Using the Develop Menu
In the menu bar of Safari, you should now see a new option called “Develop” that has just been unlocked. To view the source of a page, click on the “Develop” menu and then choose “Show Page Source.”
Safari should instantly show you the full source code of the webpage.
2. Using a Keyboard Shortcut
If you plan to access the source code of a number of webpages, you may want to use a keyboard shortcut as it will be much faster than clicking an option in the menu bar and selecting another option.
While a webpage is open in Safari, press the “Option + Command + U” key combination, and Safari should let you see the source code of the webpage.
3. Using the Right-Click Menu
If Safari is your primary browser, and you happen to be someone who is interested in viewing the codes behind various webpages, the guide above should help you do that without requiring you to leave your favorite browser.
Our latest tutorials delivered straight to your inbox
Mahesh Makvana is a freelance tech writer who's written thousands of posts about various tech topics on various sites. He specializes in writing about Windows, Mac, iOS, and Android tech posts. He's been into the field for last eight years and hasn't spent a single day without tinkering around his devices.
How-To Geek
How to turn on the develop menu in safari on mac.
The Develop menu lets you view page source in Safari on Mac.
Quick Links
How to enable the develop menu in safari on mac, how to view page source in safari on mac.
When you right-click on any web page in Safari on Mac, it doesn't reveal the Show Page Source and Inspect Element buttons. To see these, you need to enable the Develop menu---we'll show you how to do that.
Once you've enabled the Develop menu, right-clicking a blank space on any website will reveal the Inspect Element and Show Page Source buttons. These allow you to take a look at the source code of any website, which is useful for things like downloading images from websites and debugging code or finding out what it looks like behind any site (for website designers).
You can easily turn on the Develop menu in Safari by following a couple of steps. Open Safari on your Mac and click the "Safari" button in the menu bar.
Next, select "Preferences." Alternatively, you can use the keyboard shortcut Command+, (comma). This will also open up Safari preferences.
Go to the "Advanced" tab.
Check the box for "Show Develop Menu in Menu Bar."
Now the Develop menu will appear between Bookmarks and Window at the top.
Apart from being able to view the page source, this will allow you to access developer-focused features, such as disabling JavaScript on any website.
Once you've enabled the Develop menu, there are a couple of ways to view the page source in Safari.
Open any website in Safari and right-click the blank space on the page. Now, select "Show Page Source." You can also get to this menu by using the keyboard shortcut Option+Command+u.
If you're looking for images or other media elements from any web page, Safari makes it easy to find these. In the left-hand pane, you will see various folders such as Images, Fonts, etc. Click the "Images" folder to quickly find the photos that you need.
After selecting an image, you can view its details easily by opening up the details sidebar. The button to open this is located at the top-right of the console, just below the gear icon. You can also open this with the shortcut Option+Command+0.
Click "Resource" at the top of the details sidebar to view details, such as the size of the image and its full URL.
You can change the position of the page source console easily, too. There are two buttons at the top-left of this console, right next to the X button. Click the rectangle icon to move the console to a different side within the browser window.
If you'd like to open the page source console in a separate window, you can click the two-rectangles icon. This will detach the console and open it in a separate window.
To check out the code for any specific element on the page, you can right-click that element and select "Inspect Element." This will take you directly to the code for the element that you selected.
Whenever you're done looking at the code, click the X button to close the page source console and return to browsing on Safari. You can also check out how to view a website's page source in Google Chrome here.
Related: How to View the HTML Source in Google Chrome
Tips & Tricks
Troubleshooting, how to view page source in safari on mac.
Viewing a web pages source code in Safari, and other web browsers, is a fairly routine activity for many people who work with the web for a living or even as a hobby. Unlike some other browsers, to view page source in Safari you must first enable a developer toolset for the browser to be able to access the view web page source feature.
This tutorial will demonstrate how to view a web pages source in Safari on Mac OS. This applies to all versions of Safari and MacOS.
How to View Page Source in Safari for Mac
Here is how you can view a web pages source in Safari on MacOS:
- First, enable the Safari Develop menu by going to the Safari menu, choosing “Preferences”, going to “Advanced” and checking the box to enable the developer menu
- Next, in any Safari window, navigate to the web page whose source you wish to view and inspect
- Pull down the “Develop” menu at the top of the screen and select “Show Page Source” from the menu options
- The web web pages source will appear on screen in the web inspector Sources section, a web developer toolkit built into Safari
Aside from viewing page source, you can also use the Develop menu to accomplish many other web useful tricks and developer tasks, including disabling Javascript and clearing Safari cache amongst myriad other functions and capabilities that are geared towards advanced users and developers, like finding embedded files in pages .
How to View Page Source by Keyboard Shortcut in Safari on Mac
After you have the Develop menu enabled in Safari, you can also use a keyboard shortcut to quickly view any web page source in the Safari browser for Mac:
- Navigate to the web page you wish to view the page source for
- Press Command + Option + U keyboard combination to view the page source
The keyboard shortcut for viewing page source will open the web inspector tool, just like accessing it from the Develop menu.
If you’re an advanced user of Safari, enabling the Develop menu is likely one of the first things you do when you launch the browser for the first time.
For what it’s worth, the Chrome browser and Firefox browsers also have similar web element inspector capabilities, but obviously we’re focusing on Safari for Mac here.
The Developer functions in Safari for Mac are not available for iPhone or iPad (yet anyway), but if you’re interested in gaining source viewing options on the mobile side you can use this javascript trick to view page source in iOS and ipadOS versions of Safari.
Do you have any handy tips or tricks associated with viewing page source or the developer toolset in Safari? Share your thoughts, tips, and experiences with us in the comments.
Enjoy this tip? Subscribe to our newsletter!
Get more of our great Apple tips, tricks, and important news delivered to your inbox with the OSXDaily newsletter.
You have successfully joined our subscriber list.
Related articles:
- How to Turn Off Split Screen in Safari for iPad? Exiting Safari Split Screen in iPadOS
- How to Take Full Page Screenshots in Safari on iPhone & iPad
- How to Customize Safari Start Page on Mac
- How to “View Source” from Safari on an iPad or iPhone
» Comments RSS Feed
I appreciate how you made achieving this goal simple and clear. Out of all the search results I reviewed on this subject the information is the only one that has value. Thanks
I learn something from more than 90% of what you send me in your newsletters. My wife and myself are 70yrs old and we aren’t very computer literate. We both have MacBook Air laptops. They are new and running macOS Catalina 10.15.7 We are reluctant to upgrade to macOS Big Sur. I’m collecting everything I can find that you print about Big Sur. Once we’re comfortable, I think we may try it. I’m writing to thank you for what you do for us and you ask for nothing. ThankYou! ~Peter~
Leave a Reply
Name (required)
Mail (will not be published) (required)
Subscribe to OSXDaily
- - How to Uninstall Apps on MacOS Sonoma & Ventura via System Settings
- - How to Mute a Call on Apple Watch
- - How to Use the Latest GPT 4 & DALL-E 3 Free on iPhone & iPad with Copilot
- - 15 Mail Keyboard Shortcuts for Mac
- - How to Use Hover Text on Mac to Magnify On-Screen Text
- - Apple Event Set for May 7, New iPads Expected
- - Beta 2 of iOS 17.5, iPadOS 17.5, macOS Sonoma 14.5, Available for Testing
- - Opinion: Shiny Keys on MacBook Air & Pro Are Ugly and Shouldn’t Happen
- - MacOS Ventura 13.6.6 & Safari 17.4.1 Update Available
- - Using M3 MacBook Air in Clamshell Mode May Reduce Performance
iPhone / iPad
- - How to Bulk Image Edit on iPhone & iPad wth Copy & Paste Edits to Photos
- - What Does the Bell with Line Through It Mean in Messages? Bell Icon on iPhone, iPad, & Mac Explained
- - iOS 16.7.7 & iPadOS 16.7.7 Released for Older iPhone & iPad Models
- - Fix a Repeating “Trust This Computer” Alert on iPhone & iPad
- - Make a Website Your Mac Wallpaper with Plash
- - The Best Way to Clean a MacBook Air Keyboard: Microfiber Cloth & KeyboardCleanTool
- - Fix “warning: unable to access /Users/Name/.config/git/attributes Permission Denied” Errors
- - How to Fix the Apple Watch Squiggly Charging Cable Screen
- - NewsToday2: What it is & How to Disable NewsToday2 on Mac
About OSXDaily | Contact Us | Privacy Policy | Sitemap
This website is unrelated to Apple Inc
All trademarks and copyrights on this website are property of their respective owners.
© 2024 OS X Daily. All Rights Reserved. Reproduction without explicit permission is prohibited.
Chrunos is your current technology guide. Discover fascinating items on the internet and learn how to download media files.
5 Ways to View Page Source on iPhone or iPad [Inspect]
It is quite easy to view HTML page source code on Windows PC or Mac, but you don’t always hold your computer. For iOS users, you always have your iPhone around. It would be more convenient to view page source on iPhone or iPad. Actually, you can do it without third-party apps.
In this post, I will show you 5 ways to show webpage source code on iOS devices and even inspect elements. Sounds great? Keep reading to learn how.
Method 1: Create a View Source Shortcut
The first I recommend is to create a View Source shortcut that is available in Share Sheet, so you can easily access it from Safari. Shortcuts is a stock app in iOS 13 or new versions for automation. There are many amazing pre-made shortcuts that you can get from the internet.
Here I will show you how to make one to view HTML source code step by step. You can refer to the steps below or the video. If you don’t want to make it by yourself, you can also click this link to add it to your Shortcuts Library.
Step 1. Open the Shortcuts on your iPhone or iPad. Tap on the “+” icon to create a new one.
Step 2. Tap on the three-dot icon and enable the option “Show in Share Sheet”. Tap Done to go back to the new shortcut.
Step 3. Type “html” in the search bar and drag the “Make HTML from Rich Text” action from the search results to the shortcut.
Step 4. Type “quick look” in the search bar and drag the “Quick Look” action to the shortcut.
Step 5. Tap “Done” to save the shortcut and change the shortcut name to “View Source”.
Step 6. Go to Safari and open the web page where you want to view the source code. Tap the Safari Share button and select the “View Source” shortcut that you just created.
Shortcuts only accept Safari web pages, so if you want to view source code on Chrome or other web browsers, keep reading to find other alternative methods.
Method 2: Safari Bookmark Trick
Another way to view source code is via Safari bookmark. You can use bookmark to run a javascript and it will show the source code of any web page.
Step 1. Copy the script. You can go to this Github page and copy the script or copy the script below.
Step 2. Tap your browser (Chrome or Safari) Share button and select Add Bookmark. It doesn’t matter which web page you add. You just need to create a new bookmark for further usage.
Step 3. Tap on the Bookmark icon and locate the new bookmark that you just created.
Step 4. From there, tap Edit and change the new bookmark name to “View Page Source” and the URL to the script that you copied before.
Step 5. Go to the webpage where you want to view source code. Tap the Bookmark icon and select the View Page Source bookmark that you just saved.
Then it will display the source code of that web page. If you use Chrome, it is even simpler because you can change the bookmark URL on Step 2.
Method 3: DevTools Extension for Safari
If you also need to inspect elements, you can use a Safari extension for iPhone or iPad. There are a few of extensions that allows you to inspeact elements, including DevTools Extension, Web Inspector, and Achoo HTML Viewer & Inspector (Paid).
Let me take DevTools Extension as an example to show you how:
Step 1. Open AppStore and search for “DevToools Extension” or simply click on this link to install it.
Step 2. Once installed, go to Settings Safari > Extensions to enable DevTools Extension.
Step 3. Open Safari and visit any web page that you want to inspect. Tap on the AA icon from the address bar and select DevTools Extension.
Step 4. You will see a gear icon on the page. Tap on it and you will see the Developer Tools like on Desktop browser. When done, you can always click on the gear icon again to close Developer Tools.
Method 4: A Nice Browser That Spports View Source
Unfortunately, Chrome for iOS does not allow viewing page source. Alternatively, You can use Via Browser. It is a nice browser for iPhone and iPad that allows you to view page source and inspect elements.
Via Browser is also available for Android, so you can also use it to view page source on Android . Once you have the browser, you can tap the three bars icon on the bottom right and select Tools > View Source. It will open a new tab with the source code of your current page.
In addition, Via browser enables you to run userscripts and change user agent. As you know, some web apps only works on Desktop. If you use Via browser to change user agent to MacOS or Windows, then you can use Desktop web app on your iPhone or iPad.
Method 5: View Source App for iOS
You can also download a dedicated app for viewing HTML source code. For that, I recommend the free app View Source , which is designed for iPhone. Once you installed this app, you will see an option View Source in your Web Browser (Safari or Chrome) Share Sheet. You can simply tap on it to see the source code.
In addition, it can also work as a standalone app. Within the app, you can input any webpage URL and the app will load its source code automatically.
These 5 methods all work great on iOS devices. You can use any of them to view page source on iPhone or iPad based on your preference. For me, I prefer the Shortcuts method because Shortcuts allows you to customize it for all kinds of possibilities.
By Cody Chrunos
Related post, 5 ways to download videos from fmovies in 2024, 3 ways to share power automate desktop flows [to everyone], 5 ways to run android apps on windows 11 or 10, one thought on “5 ways to view page source on iphone or ipad [inspect]”.
Thanks for this, shortcut now created, most useful.
Leave a Reply
Your email address will not be published. Required fields are marked *
You cannot copy content of this page
How to view the HTML source code of a web page on Mac, iPad, and iPhone
Do you want to see what’s under the hood of web pages you visit? Check out how to view a page’s source code on Mac, iPad, and iPhone.
Whether you dabble in small-time web development or you just have the general interest of digging around in code to see how things work, there may be times when you want to see the HTML source code behind a specific web page.
It’s possible to do this from Safari (or other browsers) on your Mac, and for iPhone or iPad, you will have to use dedicated third-party apps.
View the source code of a website
Here are the steps for macOS and iOS.
The first step to being able to see the HTML code of a site is to enable Develop mode , a mode that Apple hides by default as the company assumes only developers would want to tinker with these options.
Enable Develop mode in Safari:
1) Open Safari and click Safari > Settings or Preferences from the top menu bar.
2) Go to the Advanced tab.
3) At the bottom, check the box that says Show features for web developers or Show Develop menu in menu bar .
In the menu bar, you will now see a new tab called Develop .
Show page source code:
Now that you have enabled this developer mode, you can access the source code of a web page in three different ways:
- With the web page open, go to Develop in the menu bar and select Show Page Source .
- On the web page for which you want to see the source code, press the Option + Command + U keys simultaneously.
- This is probably the easiest option. Simply Control-click or right-click on an empty area of the page and select Show Page Source .
When performing any of these actions, the source code of the page will then appear at the bottom of your Safari window. From there, you can inspect all you want.
On iPhone or iPad
If you want to view a web page’s source code from your iPhone or iPad, you will want to use an app to assist you. Most modern apps make this process easy and include useful syntax highlighting so you can better understand what you’re looking at.
We recommend using HTML Viewer Q , which is a free download from the App Store. Once installed, follow these steps to view a web page’s source code:
1) Launch HTML Viewer Q and tap the Link button at the top right of the app.
2) Enter the full URL of a web page you want to see the source code of, then tap the Go button. We will use Amazon for this example.
3) Once the page loads, tap on the Code button at the top left of the app.
You are now viewing the source code of the web page you selected. You can tap any of the numbers at the top of the app to change between different font sizes, i.e., 9pt, 12pt, 16pt, etc., and you can also use the Search button to search for any keywords or syntax you might be specifically looking for.
The app also lets you copy the HTML code so you can paste it into any other app.
This feature empowers the Curious Georges out there with the ability to see what makes a web page tick, but this is also an invaluable tool for web developers, novice or experienced, who want a better understanding of the code behind a web page or simply want to troubleshoot their own site.
Check out next: How to use Safari Web Inspector on Mac, iPad, and iPhone
How To See Source Code In Safari
- Software & Applications
- Browsers & Extensions
Introduction
When browsing the web, have you ever come across a beautifully designed website and wondered how it was created? Or perhaps you encountered a webpage with a specific feature that piqued your curiosity. In such instances, being able to view the source code of a website can provide valuable insights into its structure and functionality. Understanding the source code can be beneficial for web developers, designers, and anyone interested in learning more about web technologies.
In this article, we will explore two methods for viewing the source code in Safari, Apple's popular web browser . By understanding these methods, you can gain a deeper understanding of how websites are constructed and learn from the coding techniques employed by web developers.
Whether you're a seasoned web developer or someone who is simply curious about the inner workings of the web, knowing how to access the source code in Safari can be a valuable skill. It allows you to peek behind the curtain and gain a better understanding of the technologies that power the websites we interact with on a daily basis.
Now, let's delve into the methods for accessing the source code in Safari and unlock the secrets that lie beneath the surface of the web.
Method 1: Using the Developer Tools
One of the most powerful features of Safari is its built-in Developer Tools, which provide a comprehensive set of utilities for web development and debugging. By leveraging these tools, users can not only inspect the source code of a webpage but also analyze its structure, diagnose issues, and experiment with various elements in real-time.
To access the Developer Tools in Safari, users can follow these simple steps:
Open Safari and Navigate to the Desired Webpage : Begin by launching Safari and visiting the webpage for which you want to view the source code.
Access the Developer Tools : Once the webpage has loaded, navigate to the "Develop" menu in the Safari menu bar. If the "Develop" menu is not visible, users can enable it by going to Safari Preferences > Advanced and checking the box next to "Show Develop menu in menu bar." After enabling the "Develop" menu, click on it and select "Show Web Inspector."
Explore the Web Inspector : Upon selecting "Show Web Inspector," a panel will appear at the bottom or right-hand side of the Safari window, displaying a wealth of information about the webpage. The "Elements" tab, in particular, allows users to inspect the HTML and CSS of the webpage, view and modify the DOM (Document Object Model), and analyze the layout and styling of individual elements.
Inspect Elements and Network Activity : Within the Web Inspector, users can click on specific elements of the webpage to view their corresponding HTML and CSS code. Additionally, the "Network" tab provides insights into the network activity associated with the webpage, including the loading times of various resources such as images, scripts, and stylesheets.
Experiment and Debug : The Developer Tools in Safari offer a range of features for experimenting with code, debugging JavaScript, and optimizing webpage performance. Users can modify CSS styles, execute JavaScript commands, and analyze console logs to identify and troubleshoot issues within the webpage.
By utilizing the Developer Tools in Safari, users can gain a deeper understanding of how webpages are constructed, identify opportunities for optimization, and learn from the coding techniques employed by web developers. Whether you're a web development enthusiast, a designer seeking inspiration, or a curious individual eager to unravel the mysteries of the web, the Developer Tools in Safari provide a gateway to the inner workings of the internet.
With the ability to inspect and manipulate the source code of webpages, users can embark on a journey of discovery, uncovering the building blocks that form the digital landscape we interact with each day. The Developer Tools in Safari empower users to not only view the source code but also to interact with it, fostering a deeper appreciation for the art and science of web development.
Method 2: Using the View Source Option
In addition to the powerful Developer Tools, Safari offers a straightforward method for viewing the source code of a webpage through the "View Source" option. This method provides a quick and convenient way to access the underlying HTML, CSS, and JavaScript code of a webpage without the need for advanced developer tools.
To utilize the "View Source" option in Safari, users can follow these simple steps:
Navigate to the Desired Webpage : Begin by opening Safari and visiting the webpage for which you want to view the source code. This could be a website that captures your interest, a page with a specific feature you'd like to explore, or a site you're curious to learn from.
Access the "View Source" Option : Once the webpage has loaded, navigate to the Safari menu bar and click on "View." From the dropdown menu, select "Show Page Source" or use the keyboard shortcut "Option + Command + U." This action will open a new window or tab displaying the complete source code of the webpage.
Explore the Page Source : Upon accessing the page source, users can delve into the raw HTML, CSS, and JavaScript code that forms the foundation of the webpage. This view provides a comprehensive look at the structure, content, and styling of the webpage, allowing users to gain insights into the coding techniques and design elements employed by the web developers.
Navigate and Analyze the Source Code : Within the "Page Source" view, users can navigate through the code to examine specific elements, styles, and scripts used in the webpage. This exploration can provide valuable learning opportunities for those interested in understanding how different features and functionalities are implemented through code.
Gain Insights and Inspiration : By viewing the source code of webpages through the "View Source" option, users can gain a deeper appreciation for the intricacies of web development. Whether it's observing the structure of a responsive layout, analyzing the implementation of interactive elements, or studying the use of external libraries and frameworks, the "View Source" option offers a window into the creative and technical aspects of web design and development.
The "View Source" option in Safari serves as a gateway for users to explore the inner workings of webpages, fostering a deeper understanding of the technologies that power the internet. Whether you're a budding web developer, a design enthusiast, or simply someone with a curiosity for the digital realm, the ability to access and analyze the source code through this method can be both enlightening and inspiring.
By embracing the "View Source" option in Safari, users can embark on a journey of discovery, uncovering the building blocks that form the digital landscape we interact with each day. This method provides a user-friendly approach to peek behind the curtain of web development, empowering individuals to learn, explore, and find inspiration in the code that shapes the online experiences we encounter.
In conclusion, the ability to view the source code in Safari opens a gateway to the inner workings of the web, providing valuable insights into the technologies and techniques that drive the creation of captivating and functional websites. By exploring the two methods outlined in this article, users can gain a deeper understanding of web development, design principles, and the intricate coding that underpins the digital landscape.
Through the utilization of Safari's Developer Tools, users can delve into the intricacies of web development, inspecting and manipulating the source code to gain a comprehensive understanding of how webpages are constructed. The Developer Tools empower users to not only view the source code but also to interact with it, fostering a deeper appreciation for the art and science of web development. Whether it's analyzing the structure of a webpage, debugging JavaScript, or optimizing performance, the Developer Tools provide a playground for exploration and learning.
Additionally, the "View Source" option in Safari offers a user-friendly approach to accessing the underlying code of webpages, allowing individuals to explore the raw HTML, CSS, and JavaScript that form the foundation of the digital experiences we encounter. This method provides a quick and convenient way to gain insights into the coding techniques and design elements employed by web developers, fostering a deeper appreciation for the creative and technical aspects of web design and development.
By embracing these methods for accessing the source code in Safari, users can embark on a journey of discovery, uncovering the building blocks that form the digital landscape we interact with each day. Whether you're a seasoned web developer, a design enthusiast, or simply someone with a curiosity for the digital realm, the ability to access and analyze the source code can be both enlightening and inspiring.
In essence, the knowledge gained from viewing the source code in Safari can serve as a springboard for learning, experimentation, and inspiration. It provides a window into the creative and technical aspects of web development, empowering individuals to gain a deeper understanding of the technologies that power the internet. As the digital realm continues to evolve, the ability to peek behind the curtain of web development equips individuals with the insights and skills to contribute to the ever-changing landscape of the web.
By mastering the art of viewing the source code in Safari, individuals can unlock the potential to create, innovate, and shape the future of the web, armed with a deeper understanding of the coding techniques and design principles that drive online experiences.
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.
- Crowdfunding
- Cryptocurrency
- Digital Banking
- Digital Payments
- Investments
- Console Gaming
- Mobile Gaming
- VR/AR Gaming
- Gadget Usage
- Gaming Tips
- Online Safety
- Software Tutorials
- Tech Setup & Troubleshooting
- Buyer’s Guides
- Comparative Analysis
- Gadget Reviews
- Service Reviews
- Software Reviews
- Mobile Devices
- PCs & Laptops
- Smart Home Gadgets
- Content Creation Tools
- Digital Photography
- Video & Music Streaming
- Online Security
- Online Services
- Web Hosting
- WiFi & Ethernet
- Browsers & Extensions
- Communication Platforms
- Operating Systems
- Productivity Tools
- AI & Machine Learning
- Cybersecurity
- Emerging Tech
- IoT & Smart Devices
- Virtual & Augmented Reality
- Latest News
- AI Developments
- Fintech Updates
- Gaming News
- New Product Launches
- Fintechs and Traditional Banks Navigating the Future of Financial Services
- AI Writing How Its Changing the Way We Create Content
Related Post
How to find the best midjourney alternative in 2024: a guide to ai anime generators, unleashing young geniuses: how lingokids makes learning a blast, 10 best ai math solvers for instant homework solutions, 10 best ai homework helper tools to get instant homework help, 10 best ai humanizers to humanize ai text with ease, sla network: benefits, advantages, satisfaction of both parties to the contract, related posts.
How To Inspect In Safari On IPad
How To View Page Source On Tablet
How To Debug In Safari
How To View Page Source On Safari
How To Inspect Page On Safari
How To Download R Studio On Mac
How To Enable Inspect In Safari
What Is Internet Browser
Recent stories.
Fintechs and Traditional Banks: Navigating the Future of Financial Services
AI Writing: How It’s Changing the Way We Create Content
How to Know When it’s the Right Time to Buy Bitcoin
How to Sell Counter-Strike 2 Skins Instantly? A Comprehensive Guide
10 Proven Ways For Online Gamers To Avoid Cyber Attacks And Scams
- Privacy Overview
- Strictly Necessary Cookies
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
How to view source code of a webpage on your iPhone or iPad
Published 25 Sep 2014
We’re big fans of iOS 8’s new Extensions framework, and a new Extension by developer Paul Hudson lets you view the source code for a webpage, right within Safari.
You could view source code of a webpage previously, but you needed a dedicated app, and had to open the page in that app. This extension lets you view the syntax highlighted source code (HTML, Javascript and CSS) without leaving Safari.
Here’s how you do it:
- Download and install View Source from this App Store link ($0.99) .
- Open the app once, and then hop back to Safari.
- Open the webpage whose source you want to view in Safari.
- Tap on the Share button to bring up iOS 8’s Share sheet.
- The second row of icons contains Action Extensions. Scroll to the right of this row to reveal the More icon, and tap on it.
- You should see a list of available extensions, scroll to the View Source extension, and enable it by turning on the toggle.
- Now tap on the View Source icon.
- You should now see a new screen with the source code of the page.
- You can copy the source code to your clipboard or send it as an email.
This could be very useful to web developers who want to have a peek at the source code of their site, while they’re on the go.
Want to know more about Apple Products?
We launch new articles subscribe and get updated. MAX 1 email a week. No spam, ever.
You May Also Like
- Safari Now Has One Billion Users, but Still Lags behind Google Chrome’s Popularity
- Edge Dethrones Safari as World’s Second Most Popular Browser
- Apple, Google, Microsoft, Mozilla Working Together to Improve Interoperatibility Across Web Browsers
- Web Developers Rally Against Apple’s Anti-Competitive Browser Engine Rules on iOS
Related Articles
Safari Could Get Website-Specific Dark Mode Toggle
Chandraveer Mathur
Microsoft Edge Could Dethrone Safari as World’s Second Most Popular Browser on Desktop
Safari Team Solicits Feedback Amid Complaints Calling it ‘the New IE’
Safari Bug in macOS and iOS 15 Could Leak Your Personal Data and Allow Websites to Track Your Browsing History
- Apple Watch
- Apple Pencil
Oct 30, 2016
11 Must Have Apps for Apple Pencil and iPad Pro Users
Khamosh Pathak
iPad Pro is a beast of a machine. Yes, it runs iOS but don’t let that fool you. iOS has many ways to be productive and for doing creative work. Granted, it’s different
Jun 13, 2016
‘Apple File System’ Is the Company’s New File System for watchOS, iOS, tvOS, and macOS
Rajesh Pandey
It has long been rumored that Apple is working on a new file system to replace the archaic HFS+ file system that macOS currently uses. The company was expected to announce a new file system
Mar 16, 2015
‘Apple Global Volunteer Program’ will let employees sign up to help local communities
Evan Selleck
Apple is no stranger to donating large sums of money to a cause, or to even help diversification within the tech industry. But now it's aiming to donate some individual human hours as well,
Want to know more about apple Products
- The Best Tech Gifts Under $100
- Traveling? Get These Gadgets!
How to View the Source Code of a Web Page
View a web page's source code to diagnose errors
What to Know
- On most major browsers, you can access a site's source code by pressing Ctrl + U in Windows.
- On a Mac, press Cmd + Option + U within most major browsers or Cmd + U in Firefox.
- On Android, use the view-source: URL tweak to view source code. On Safari for iOS, this isn't supported.
Although web browsers interpret the Hypertext Markup Language files and Cascading Style Sheets that make the web appear as it does, a hotkey or URL tweak forces browsers to display the source code of that page in a new tab or window. Although most people rarely need to examine the source code, developers use this perspective to troubleshoot layout inconsistencies or to fix bugs on a website.
How to View Source in a Desktop Browser
For all the major desktop browsers — Google Chrome , Microsoft Edge , Mozilla Firefox, Opera, Vivaldi—press Ctrl+U to open a new tab that displays the raw HTML of the page you're on. On a Mac , press Cmd+Option+U or Cmd+U in Firefox.
Alternatively, all desktop browsers support a URL-specific tweak. Prepend the text view-source: to the URL to open the page in Source mode. For example, type view-source:https://www.lifewire.com to view the source code behind Lifewire's main landing page.
Prefer a mouse, or need to tweak the HTML on the fly? All the main browsers support a View Source command somewhere within its menu structure, and they also support a developer mode (named various things, and launched various ways) that permits real-time tweaking to how a page executes based on changes you make in the developer interface.
How to View Source on a Default Mobile Browser
The stock Android browser allows the view-source: URL tweak. On iOS, however, the stock Safari app does not support this feature. On Apple's platform, you'll need to launch a different browser or a source-code viewing app from the App Store.
Individual mobile browsers that you installed from your platform's app store behave differently. Consult the browser's documentation for specific procedures.
Get the Latest Tech News Delivered Every Day
- How to View the HTML Source in Google Chrome
- How to View the Source of a Message in Gmail
- How to View HTML Source in Safari
- The 30 Best Gmail Keyboard Shortcuts for 2024
- How to View and Type Emojis on a Computer
- How to Print a Web Page
- How to View the Source of a Message in Mozilla Thunderbird
- 8 Best Free HTML Editors for Windows for 2024
- The 10 Best Bookmarking Tools for the Web
- How to Use Web Browser Developer Tools
- How to Search for a Word on a Web Page
- How to Send HTML Email
- How to View the Source of a Message in Apple Mail
- Keyboard Shortcuts: Google Chrome for Windows
- The Top 10 Internet Browsers for 2024
- What Is a Web Browser?
Tutoriels, Tests et Actus Apple
Safari iOS: comment afficher le code source des pages web sur son iPhone ou iPad
Voici un pas à pas pour ceux qui souhaitent afficher le code source (html, javascript, etc.) des pages web qui s’affichent sur leur appareil iOS, par exemple un iPhone ou un iPad.
Notre pas à pas aujourd’hui s’adresse plutôt aux développeurs web et ceux intéressés par certains aspects techniques parmi nos lecteurs. Vous est-il jamais arrivé de vouloir connaître le code source (html, javascript, etc.) d’un page web qui s’affiche sur votre iPhone ou votre iPad ? Cependant quand vous êtes sur Safari sur votre appareil iOS, il n’y a aucune option pour le faire comme sur un navigateur sur un ordinateur, où une option dans ce sens est disponible (le plus souvent dans le menu du clic droit). Vous allez me dire qu’il suffit simplement d’utiliser le navigateur sur votre ordinateur pour accéder au code source en question. C’est vrai pour certains sites mais de nos jours, de plus en plus de sites web proposent un affichage différent sur les appareils mobiles et sur les navigateurs standards. Donc si c’est le code mobile qui vous intéresse, il ne suffira pas de passer sur votre ordinateur. Fort heureusement, il existe plusieurs façons d’afficher le code source d’une page web mobile, directement sur l’appareil ou sur votre ordinateur. Suivez ce pas à pas pour tout savoir.
(Note: toutes les images de l’article peuvent être cliquées pour un agrandissement)
L’astuce Shaun Inman/ Ole Michelsen
Avec cette première méthode nous allons directement afficher le code source dans Safari iOS en utilisant une petite astuce et du code proposé par Shaun Inman. L’astuce consiste à utiliser un marque-page enrichi avec du JavaScript. Notez bien avant de commencer à utiliser cette astuce que l’adresse et le contenu html du site web dont vous essayez de voir la source seront transférés vers http://www.shauninman.com. Si cela ne vous convient pas, passez à une autre méthode pour afficher la source.
Cela étant dit la première chose à faire est de naviguer sur votre appareil iOS, en utilisant Safari vers la page web de cet article et de copier le code source suivant:
javascript:location=’http://shauninman.com/vs/?url=’+escape(location)
Une fois le code copié, suivez les instructions sous les images.
Naviguez vers n’importe quelle page web avec Safari sur iOS puis utilisez le bouton des actions disponibles au bas de la page pour créer un signet/marque-page. Notre illustration provient d’iOS 7, sur les autres versions d’iOS, cela peut être légèrement différent.
Dans le menu des marques-pages, utilisez Ajouter un signet.
Safari vous propose par défaut comme nom pour votre signet celui de la page web que vous étiez en train de visiter. Il vaut mieux pour plus de clarté renommer ce signet avec un nom plus explicite. Par exemple, appelons le signet « Code Source ». Une fois le changement de nom opéré, appuyez sur Enregistrer.
De retour sur la page web, utilisez maintenant le bouton des signets/marque-page pour lister les signets déjà enregistrés.
Évidemment celui que nous venons juste de créer doit apparaître. Cliquer sur Modifier au bas de la page.
Choisir maintenant le signet « Code Source » que nous avons crée afin de le modifier.
Ce que nous voulons modifier cette fois c’est la partie qui contient l’url. Il faut effacer l’url actuelle qui ne nous intéresse pas et le remplacer par le code JavaScript que nous avons copié en mémoire en commençant le pas à pas au dessus.
Effacer l’url actuelle puis cliquez sur la zone de texte vide afin de pouvoir coller le contenu du presse papier et faites colle. Vous devez voir apparaître le code JavaScript comme ci-dessus. Cliquez maintenant sur Terminé pour enregistrer votre modification.
Une fois que vous avez fini avec la procédure ci-dessus, vous avez maintenant un outil puissant pour afficher le code source des pages web. Vous n’avez à effectuer la procédure au dessus qu’une seule fois. Une fois le marque-Page « Code Source » modifié et enregistré, vous pouvez simplement l’utiliser autant que vous voulez. Pour l’utiliser, rien de plus simple: naviguez vers n’importe quel site web dont vous souhaitez connaître le code source, puis cliquez sur le bouton des marques-pages/signets.
Dans l’interface, cliquez simplement sur le signet « Code Source ».
Et voilà, le code JavaScript se met en marche et le code source de la page web que vous visitez actuellement apparaît à l’écran !
Voilà une méthode élégante et efficace pour afficher le code source d’une page web mobile. A noter qu’Ole Michelsen propose aussi une astuce équivalente mais nous n’avons pas réussi à la faire fonctionner avec notre version de Safari iOS. Cependant, vous pouvez également visiter son astuce: Ole Michelsen .
Utiliser une application dédiée
Une seconde solution pour afficher le code source d’une page web sur son appareil iOS consiste simplement à utiliser une application dédiée. C’est relativement simple à mettre en oeuvre mais il y a un inconvénient: si vous naviguez dans Safari et que vous avez besoin d’afficher le code source, il faut sortir de Safari, entrer dans l’application dédiée et naviguer à nouveau vers la page dont vous souhaitez voir le code source. Voici une liste d’applications que vous pouvez utiliser:
- Atomic Web Browser (navigateur complet avec affichage code source)
- iSource Browser (navigateur complet avec affichage code source)
- iSource Browser (version limitée)
- HTML Viewer
Si vous voulez une application tout en un, un navigateur complet tourné vers les développeurs comme Atomic Web Browser ou iSource Browser qui permettent de voir le code source directement mais également de réaliser toutes les autres tâches de navigation.
Voici le code source tel qu’il apparaît dans iSource Browser .
Utiliser le mode Agent Utilisateur de Safari
La troisième solution que vous pouvez utiliser ne se passe pas sur votre appareil iOS mais sur votre ordinateur. Safari dispose d’un mode Développement qui vous permet d’afficher une page web comme si vous étiez sur un appareil mobile puis d’en afficher le code source. C’est très pratique mais cette option n’est pas activée par défaut sur Safari et il faut disposer d’un ordinateur.
Sur Mac utilisez Spotlight (la loupe à côté de l’horloge) pour lancer Safari. Commencer à taper « Safari » et choisissez Safari dans la liste.
Lorsque Safari est lancé par défaut, vous ne pouvez pas accéder aux menu avancé de développement.
Utilisez le menu « Safari » puis accédez aux préférences.
Dans les Préférences, naviguez jusque vers l’onglet des Options Avancées.
Au bas des options avancées, cochez la case Afficher le menu Développement dans la barre des menus comme ci-dessus puis quittez les préférences en cliquant sur le bouton rouge en haut à gauche.
A présent, un nouveau menu appelé Développement est apparu.
Dans ce menu, repérer l’option Agent d’utilisateur. Cette option vous permet de naviguez comme si vous étiez sur un autre système/navigateur. Parmi ces systèmes, vous avez les appareils mobiles d’Apple comme l’iPhone ou l’iPad mais également des navigateurs concurrents comme Internet Explorer, Firefox ou Chrome décliné sur Mac ou PC. C’est donc une fonctionnalité assez puissante.
Choisir comme Agent d’utilisateur un appareil mobile Apple comme l’iPhone. Safari va faire comme si vous étiez sur Safari iOS 5.1 dans notre exemple.
A présent si vous naviguez vers une page web, Safari vous l’affiche comme si vous étiez vraiment sur l’appareil mobile sélectionné. Si vous naviguez sur un site qui change sa mise en page ou son affichage en fonction de l’appareil, vous verrez une différence entre cette version et l’affichage normal. Pour afficher le code source de la page, toujours dans le menu Développement, il suffit de choisir l’option Afficher le code source de la page. Et voilà, un éditeur assez puissant apparaît et vous pouvez parcourir les balises comme vous le souhaitez.
Lier Safari mobile avec Safari
Une dernière solution consiste à lier Safari mobile sur votre appareil iOS avec Safari sur votre ordinateur. Pour cela vous aurez besoin du câble USB de votre iPhone.
Naviguez tout d’abord sur une page web sur votre iPhone. Puis connectez votre iPhone et votre Mac via USB avec le câble fourni avec votre appareil.
Lancez à présent Safari sur votre ordinateur tout en le mode développement activé (voir la section précédente pour une explication de comment faire cela). Dans le menu développement, le nom de votre appareil iOS devrait apparaître, ici un iPhone. Si vous choisissez votre appareil, une liste de toutes les pages ouvertes actuellement sur votre Safari mobile apparaît ! Il suffit de choisir la page dont vous souhaitez afficher le code source dans cette liste.
Notez que Safari sur votre appareil mobile réagit interactivement à vos choix sur Safari sur le Mac en surlignant l’écran.
Sur votre Mac le code source de la page que vous êtes en train de naviguer sur Safari mobile apparaît !
Vous pouvez passer votre souris sur des passages de votre code et comme par magie…ces passages sont surlignés sur votre appareil iOS ! Assez pratique.
Et voilà, afficher le code source d’une page web mobile ne devrait plus avoir de secret pour vous. Si vous avez d’autres méthodes n’hésitez pas à commenter ci-dessous.
Pour continuer....
iOS 14: Apple a ajouté un bouton secret qui a échappé à tout le monde !
iOS: que faire si le minuteur ne s’affiche pas sur l’écran de verrouillage ?
Transformer vos PDF en slides de présentation Keynote sur votre Mac
iOS 14: activer et utiliser la reconnaissance des sons
Laisser un commentaire Annuler la réponse
Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *
Commentaire *
iOS: que faire si le minuteur ne s’affiche pas sur l’écran de verrouillage ?
Outdoor HomeKit Gadgets: The MacStories Team Collection
Ketchup: the only pokémon companion app you’ll ever need, how to load your game boy games onto the iphone to play in the delta emulator, this week's sponsor:.
Ensures that if a device isn’t secure it can’t access your apps. It’s Device Trust for Okta.
View Source Code in Safari with an Action Extension
Developed by Paul Hudson, View Source is a $0.99 Universal app that, as the name largely implies, lets you view the source code for webpages (HTML, CSS, and JavaScript) in iOS’ Safari with an action extension.
In the years I’ve been running MacStories and since I switched to the iPad as my primary device, I’ve often needed to debug problems on the site by looking at its source code output. Before I figured I could use Python to fetch a page’s source, I was forced to ask my colleagues or my web developer to grab the source code for me because “I was on the iPad”. In spite of iPhones and iPads being required test devices for web developers these days, Apple never added native developer features to iOS that wouldn’t need a Mac to work. I was stuck with my Python scripts and help from friends over iMessage.
With iOS 8 extensions, apps like View Source can be possible thanks to direct integration with Safari and access to the DOM . Once enabled in the browser’s share sheet, View Source will bring up a full-screen panel with source code you can read and copy. A share button lets you copy all text to the clipboard, send as email, or choose one from eight themes that include dark backgrounds and lighter styles. All these themes support syntax highlighting – a better visualization than my old scripts that didn’t support highlighting at all.
If you don’t want to run View Source as an extension (though that’s the biggest advantage), you can also use it as a standalone app. In that case, the app will simply let you browse websites manually (just like Linky ).
I wish that View Source could do more. Notably, there is no support for search or browsing of specific HTML tags, which combined with the lack of line-wrapping makes it difficult to read source code as you need to constantly scroll horizontally on the screen (especially a problem on the iPhone’s smaller screen in portrait mode). I’m hoping that a text reflow mode will be added soon, and I wouldn’t mind the more advanced options for viewing source code found in Mac apps such as Coda .
View Source isn’t perfect, but it’s a good start. Being able to view source code directly in Safari is a much better experience than having to use a dedicated app that’s not your main browser. Once again, developers are still figuring out the best ways to work with extensions in iOS 8, and View Source is yet another example of these new possibilities.
View Source is $0.99 on the App Store .
Unlock More with Club MacStories
Founded in 2015, Club MacStories has delivered exclusive content every week for over six years.
In that time, members have enjoyed nearly 400 weekly and monthly newsletters packed with more of your favorite MacStories writing as well as Club-only podcasts, eBooks, discounts on apps, icons, and services. Join today, and you’ll get everything new that we publish every week, plus access to our entire archive of back issues and downloadable perks.
The Club expanded in 2021 with Club MacStories+ and Club Premier . Club MacStories+ members enjoy even more exclusive stories, a vibrant Discord community, a rotating roster of app discounts, and more. And, with Club Premier, you get everything we offer at every Club level plus an extended, ad-free version of our podcast AppStories that is delivered early each week in high-bitrate audio.
Choose the Club plan that’s right for you:
- Club MacStories : Weekly and monthly newsletters via email and the web that are brimming with app collections, tips, automation workflows, longform writing, a Club-only podcast, periodic giveaways, and more;
- Club MacStories+ : Everything that Club MacStories offers, plus exclusive content like Federico’s Automation Academy and John’s Macintosh Desktop Experience, a powerful web app for searching and exploring over 6 years of content and creating custom RSS feeds of Club content, an active Discord community, and a rotating collection of discounts, and more;
- Club Premier : Everything in from our other plans and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.
Federico Viticci
Federico is the founder and Editor-in-Chief of MacStories, where he writes about Apple with a focus on apps, developers, iPad, and iOS productivity. He founded MacStories in April 2009 and has been writing about Apple since. Federico is also the co-host of AppStories , a weekly podcast exploring the world of apps, and Unwind , a fun exploration of media and more.
He can also be found on his other podcasts on Relay FM: Connected and Remaster , two shows about Apple and videogames, respectively.
View Source for Safari on iOS with Shortcuts
I love view-source , it's a nifty super power of the web that nearly all mobile browsers are trying to kill. Not exactly sure why. View-source is what got me into web development because I could see how other people structured their pages, and at the time I started web development it was pretty much the only way to debug web pages.
I've also been using my iPad Pro whilst I am not at work for the next month or so... It's a great device, and it appears to be locked down in a way that restricts me from doing exactly what I want... this is until I found out about the Shortcuts app that is built in to iOS.
Shortcuts let you build small utilities, programs and automations that perform actions on certain user gestures like "Share a Page", or "Open an app", or "Connect to WiFi".
Now that I can share URLs to an "app", I can do a lot of things that are not really possible on mobile devices.
I created this "View Source" shortcut that you can use (if you trust me) to Share a page from Safari or Chrome and quickly view the source.
Here it is in action:
There is one major caveat. It doesn't inspect the exact instance of the page you are running, it has to the page in a 3rd party site that I built ( https://www-source.glitch.me ) / source - this means that if you are logged in, or there is any state that is shared (such as cookies) then it will not display the same content that you are viewing.
It's kinda hard to share the source code of a Shortcuts, so here is a screenshot:
I really hope that Safari (and Chrome) can deprecate the need for this shortcut.
- Sorry Safari team
- Creating a quick launcher for Android using the web
- Shiming Request.formData in Safari
- Twitter is using PWA shortcuts
- Ricky Mondello: Adoption of Well-Known URL for Changing Passwords
I lead the Chrome Developer Relations team at Google.
We want people to have the best experience possible on the web without having to install a native app or produce content in a walled garden.
Our team tries to make it easier for developers to build on the web by supporting every Chrome release, creating great content to support developers on web.dev , contributing to MDN, helping to improve browser compatibility, and some of the best developer tools like Lighthouse, Workbox, Squoosh to name just a few.
I love to learn about what you are building, and how I can help with Chrome or Web development in general, so if you want to chat with me directly, please feel free to book a consultation .
I'm trialing a newsletter, you can subscribe below (thank you!) Enter your email
- EXPLORER À propos de wikiHow Tableau de bord communautaire Au hasard Catégories
Connectez-vous
- Parcourez les catégories
- En savoir plus au sujet de wikiHow
- Connexion/Inscription
- Ordinateurs et l'électronique
- Informatique
- Programmation
Comment voir le code source
Cet article a été rédigé avec la collaboration de nos éditeurs(trices) et chercheurs(euses) qualifiés(es) pour garantir l'exactitude et l'exhaustivité du contenu. L'équipe de gestion du contenu de wikiHow examine soigneusement le travail de l'équipe éditoriale afin de s'assurer que chaque article est en conformité avec nos standards de haute qualité. Cet article a été consulté 236 561 fois.
Vous pourrez visualiser le code source d'une page web, qui constitue son programme, avec la plupart des navigateurs actuels. Il est cependant impossible de le faire sur les appareils mobiles, à moins de mettre en application une petite astuce sur le navigateur Safari .
Voir le code source sous Chrome, Firefox, Edge, et Internet Explorer
- Prenez soin de ne pas faire de clic droit sur un lien, une image ou une photo sur la page, parce que le menu qui s'affichera ne correspondrait pas à celui qui est attendu.
- Sous Chrome ou Firefox, vous verrez s'afficher Code source de la page dans le menu déroulant, tandis que sous Microsoft Edge ou Internet Explorer, vous pourrez lire Afficher le code source .
- Vous arriverez au même résultat en pressant simultanément les touches Ctrl + U de votre clavier si vous utilisez un PC, et ⌥ Option + ⌘ Command + U si vous travaillez sur un Mac.
Voir le code source sous Safari
- En pressant simultanément les touches ⌥ Option + ⌘ Command + U de votre clavier, vous obtiendrez le même résultat.
- Bien que vous ne puissiez habituellement pas visualiser le code source d'une page web sur le navigateur d'un appareil mobile, vous pourriez utiliser un marque-page sur un iPhone ou un iPad pour afficher le code source avec Safari sur votre mobile .
Avertissementss
- Soyez très prudent si vous téléchargez des applications tierces prétendant afficher le code source d'un site web.
wikiHows en relation
À propos de ce wikiHow
Cet article vous a-t-il été utile ?
Articles en relation.
Abonnez-vous à la newsletter gratuite de wikiHow !
Des tutoriels utiles dans votre boitier de réception chaque semaine.
Articles tendance
Vidéos tendance
- À propos de wikiHow
- Contactez nous
- Plan du site
- Termes et conditions
- Politique de confidentialité
- Do Not Sell or Share My Info
- Not Selling Info
Suivez-nous
Abonnez-vous pour recevoir la
newsletter de wikiHow!
How to view the html page source of a website in Safari
This is a bit of an advanced tip for web developers. Safari used to have a menu item called ‘View Page Source’. If you selected this you could see the HTML code of the website you were viewing. This option has been removed from recent versions of Safari but you can re-enable it by turning on Safari’s Develop menu.
You can enable the extra menu in Safari by selecting ‘Preferences’ under Safari in the OS X menu bar and then under the ‘Advanced’ pane select the checkbox that says ‘Show Develop menu in menu bar.’
Now you will see the following extra menu in Safari:
This contains useful tools for developers.
‘Show Page Source’ will show you the HTML page source code.
You can also Empty Caches from here, and even trick a webpage into thinking you are using a different browser to see if it renders differently.
If you change your mind just type the same command into terminal but with a ‘0’ at the ned instead of the ‘1’.
Share this:
Latest Comments
The angle of the Torx was quite tricky, but I think I used just a normal Torx driver. Looking at…
I have been using Quicken for many years on the Mac in Australia. I have tried probably all or almost…
Hi Wayne, Thanks for responding to my questions…! I totally appreciate that it was a while ago but your site…
Article Categories
- advanced (40)
- Apple News (21)
- Apple TV (5)
- beginners (17)
- dragon (19)
- drivers (9)
- entertainment (1)
- gadgets (4)
- google (18)
- hardware (47)
- internet (30)
- iphone (33)
- itunes (21)
- keynote (8)
- livestream (1)
- macbook (4)
- macintoshhowto (9)
- movies (24)
- networking (3)
- performance (11)
- podcasting (2)
- Presentations (18)
- printing (19)
- problems (18)
- productivity (26)
- publishing (18)
- Repairs (5)
- reviews (11)
- samsung (4)
- software (44)
- speech recognition (9)
- Steve Jobs (5)
- telstra (6)
- Windows (1)
- Wordpress (9)
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Notify me of follow-up comments by email.
Notify me of new posts by email.
This site uses Akismet to reduce spam. Learn how your comment data is processed .
- PRO Courses Guides New Tech Help Pro Expert Videos About wikiHow Pro Upgrade Sign In
- EDIT Edit this Article
- EXPLORE Tech Help Pro About Us Random Article Quizzes Request a New Article Community Dashboard This Or That Game Popular Categories Arts and Entertainment Artwork Books Movies Computers and Electronics Computers Phone Skills Technology Hacks Health Men's Health Mental Health Women's Health Relationships Dating Love Relationship Issues Hobbies and Crafts Crafts Drawing Games Education & Communication Communication Skills Personal Development Studying Personal Care and Style Fashion Hair Care Personal Hygiene Youth Personal Care School Stuff Dating All Categories Arts and Entertainment Finance and Business Home and Garden Relationship Quizzes Cars & Other Vehicles Food and Entertaining Personal Care and Style Sports and Fitness Computers and Electronics Health Pets and Animals Travel Education & Communication Hobbies and Crafts Philosophy and Religion Work World Family Life Holidays and Traditions Relationships Youth
- Browse Articles
- Learn Something New
- Quizzes Hot
- This Or That Game New
- Train Your Brain
- Explore More
- Support wikiHow
- About wikiHow
- Log in / Sign up
- Computers and Electronics
- Programming
How to View Source Code
Last Updated: March 23, 2024 Tested
This article was co-authored by wikiHow staff writer, Jack Lloyd . Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. The wikiHow Tech Team also followed the article's instructions and verified that they work. This article has been viewed 990,033 times. Learn more...
This wikiHow teaches you how to view the source code of a website, which is the code behind any website (such as HTML, CSS, and JavaScript), on most common browsers. Excluding a Safari trick, you cannot view a website's source code while using a mobile browser.
Chrome, Firefox, Edge, and Internet Explorer
- Don't right-click a link or a photo when doing this or else the wrong menu will appear.
- You'll see View page source for Chrome and Firefox, and View Source for Microsoft Edge and Internet Explorer.
- You can also press Ctrl + U (PC) or ⌥ Option + ⌘ Command + U (Mac) to display the source code.
- You can also press ⌥ Option + ⌘ Command + U to display the source code.
Community Q&A
- While you can't usually view source code on a mobile browser, you can save a Safari bookmark on iPhone or iPad to view mobile Safari source code. Thanks Helpful 0 Not Helpful 0
- Be wary of downloading third-party applications that claim to display the source code of a website. Thanks Helpful 7 Not Helpful 0
You Might Also Like
About This Article
1. Open the website in a browser. 2. Right-click the page. 3. Click View page source or View source . Did this summary help you? Yes No
- Send fan mail to authors
Is this article up to date?
Featured Articles
Trending Articles
Watch Articles
- Terms of Use
- Privacy Policy
- Do Not Sell or Share My Info
- Not Selling Info
wikiHow Tech Help:
Tech troubles got you down? We've got the tips you need
IMAGES
VIDEO
COMMENTS
Now, Make sure to enable Source. Then, tap on Done at the top right corner to confirm. Access/View Webpage Source Code in Safari on iPhone and iPad. Once you have enabled Safari extension, you can easily access the source code of any web page. Step #1. Launch Safari on your iOS device. Step #2. Go to any web page. Step #3. Next, tap on the ...
View Source Code in Safari. Showing source code in Safari is easy: Open Safari. Navigate to the web page you would like to examine. Select the Develop menu in the top menu bar. Select the Show Page Source option to open a text window with the HTML source of the page. Alternatively, press Option+Command+U on your keyboard.
View the Source Code of a Webpage in Safari on Mac. 1. Launch Safari on your Mac. 2. When Safari launches, click on the "Safari" menu on the top followed by "Preferences…". 3. When the Preferences panel opens, click on the tab that says "Advanced". It should be the last one in the menu on the top.
Open Safari on your Mac and click the "Safari" button in the menu bar. Next, select "Preferences." Alternatively, you can use the keyboard shortcut Command+, (comma). This will also open up Safari preferences. Go to the "Advanced" tab. Check the box for "Show Develop Menu in Menu Bar." Now the Develop menu will appear between Bookmarks and ...
Here is how you can view a web pages source in Safari on MacOS: First, enable the Safari Develop menu by going to the Safari menu, choosing "Preferences", going to "Advanced" and checking the box to enable the developer menu. Next, in any Safari window, navigate to the web page whose source you wish to view and inspect.
Mobile Safari can call other programs to "View Source" via the share functionality in iOS / iPadOS. To transform your web page into source, install an app that has this functionality (e.g. View Source - HTML, JavaScript and CSS), click the share button in the middle of screen footer (the icon depicts an arrow out from a square). This will open ...
Step 6. Go to Safari and open the web page where you want to view the source code. Tap the Safari Share button and select the "View Source" shortcut that you just created. Shortcuts only accept Safari web pages, so if you want to view source code on Chrome or other web browsers, keep reading to find other alternative methods. Method 2 ...
View source code shortcut on share sheet on Safari. Touch the Share button on the Safari app and scroll down to find the View Source Code shortcut. Tap the shortcut and you get the HTML source code in Quick Look. 2. View Page Source Using a Bookmark Script. In this method, you'll create a bookmark and the URL will be a view source script.
You may want to view the HTML source of a web page. This short tutorials explains how to view the source of a webpage: 1. Safari menu > Preferences > Advanced. 2. Check "Show Develop menu in menu bar". Close Safari's preferences. 3. Develop menu > Show Page Source OR right click your mouse and select "Show Page Source".
Once installed, follow these steps to view a web page's source code: 1) Launch HTML Viewer Q and tap the Link button at the top right of the app. 2) Enter the full URL of a web page you want to see the source code of, then tap the Go button. We will use Amazon for this example. 3) Once the page loads, tap on the Code button at the top left of ...
8 Easy Steps to see HTML source codes. Tap Safari (iPhone, iPod, or iPad), if it is not already open, and visit this page. This method also works for Chrome. Choose the Name Field and hit the X icon to clear it and name it "Show Page Source" and then tap "Save.".
Open Safari and Navigate to the Desired Webpage: Begin by launching Safari and visiting the webpage for which you want to view the source code. Access the Developer Tools: Once the webpage has loaded, navigate to the "Develop" menu in the Safari menu bar. If the "Develop" menu is not visible, users can enable it by going to Safari Preferences ...
This extension lets you view the syntax highlighted source code (HTML, Javascript and CSS) without leaving Safari. Here's how you do it: Download and install View Source from this App Store link ($0.99). Open the app once, and then hop back to Safari. Open the webpage whose source you want to view in Safari.
By. Scott Orgera. Updated on December 27, 2021. What to Know. On most major browsers, you can access a site's source code by pressing Ctrl + U in Windows. On a Mac, press Cmd + Option + U within most major browsers or Cmd + U in Firefox. On Android, use the view-source: URL tweak to view source code. On Safari for iOS, this isn't supported.
Safari dispose d'un mode Développement qui vous permet d'afficher une page web comme si vous étiez sur un appareil mobile puis d'en afficher le code source. C'est très pratique mais cette option n'est pas activée par défaut sur Safari et il faut disposer d'un ordinateur.
Configure Safari Browser. Select Safari > Preferences in the upper left corner. Advanced > Check Show Develop menu in menu bar. Next, in the top menu, you will see the Develop option, and you can open the source code of the web page to view it. Or you can use the shortcut key option + command + u to view page source.
We're big fans of iOS 8's new Extensions framework, and a new Extension by developer Paul Hudson lets you view the source code for a webpage, right within Sa...
Being able to view source code directly in Safari is a much better experience than having to use a dedicated app that's not your main browser. Once again, developers are still figuring out the best ways to work with extensions in iOS 8, and View Source is yet another example of these new possibilities. View Source is $0.99 on the App Store.
Afficher le code source d'une page Web dans Safari sur Mac. 1. Lancez Safari sur votre Mac. 2. Au lancement de Safari, cliquez sur le menu « Safari » en haut suivi de « Préférences…. 3. Lorsque le panneau Préférences s'ouvre, cliquez sur l'onglet « Avancé ». Il devrait être le dernier dans le menu du haut. 4.
Here it is in action: There is one major caveat. It doesn't inspect the exact instance of the page you are running, it has to the page in a 3rd party site that I built ( https://www-source.glitch.me) / source - this means that if you are logged in, or there is any state that is shared (such as cookies) then it will not display the same content ...
Télécharger l'article. 1. Ouvrez votre navigateur. Le processus d'affichage du code source sera le même avec les navigateurs Chrome, Firefox, Microsoft Edge et Internet Explorer. 2. Allez sur une page web qui vous intéresse. Choisissez en une dont vous voulez voir le code source. 3. Faites un clic droit sur la page.
This is a bit of an advanced tip for web developers. Safari used to have a menu item called 'View Page Source'. If you selected this you could see the HTML code of the website you were viewing. This option has been removed from recent versions of Safari but you can re-enable it by turning on Safari's Develop menu.
This menu is to the left of the Window menu in your Mac's menu bar. 8. Click Show Page Source. It's near the bottom of the drop-down menu. Clicking this option will prompt Safari to display the webpage's source code. You can also press ⌥ Option +⌘ Command + U to display the source code. Method 3.