How to check View Source in Mobile Browsers (Both

2019-02-08 10:55发布

I need to check the view source of the page from mobile / tablet browsers ( Android Phones/Tablets and Feature Phones).

I tried some of the methods but is not feasible like in desktop. I feels difficult to check it.

JS

javascript: alert(document.getElementsByTagName('html')[0].innerHTML);

Chrome && Firefox (Android)

view-source:http://domain.com

Is it there any other method to check in other browsers and in featured phone browsers

4条回答
Animai°情兽
2楼-- · 2019-02-08 11:27

I found this in Google. Hope this could help you.

http://viewsource.in

查看更多
SAY GOODBYE
3楼-- · 2019-02-08 11:28

This is an old post but still a problem within the Chrome dev tools. I find the best way to check mobile source locally is to open the site locally in Xcode's iOS Simulator. Then from there you open the Safari browser and enable dev tools, if you have not already done this (go to preferences -> advanced -> show develop menu in menu bar). Now you will see the develop option in the main menu and can go to develop -> iOS Simulator -> and the page you have open in Xcode's iOS Simulator will be there. Once you click on it, it will open the web inspector and you can edit as you would normally in the browser dev tools.

I'm afraid this solution will only work on a Mac though as it uses Xcode.

查看更多
地球回转人心会变
4楼-- · 2019-02-08 11:29

You could try the remote debugging on Chrome for desktop to debug the code on Chrome for Android

https://developer.chrome.com/devtools/docs/remote-debugging

There are several apps on Google Play that enables view source directly from the phone. Here is one: https://play.google.com/store/apps/details?id=com.androidyou.webpagelite&hl=en

A quick search on Google Play lists multiple apps: https://play.google.com/store/search?q=view%20source&c=apps&hl=en

查看更多
贪生不怕死
5楼-- · 2019-02-08 11:49

You can try this cool app available in play store called Html Page Source https://play.google.com/store/apps/details?id=com.scintillar.hps

查看更多
登录 后发表回答