To show a sites source in FireFox, you can just type view-source:<URI-here>
before the URL.
example: view-source:https://www.facebook.com/
To show a sites source in FireFox, you can just type view-source:<URI-here>
before the URL.
example: view-source:https://www.facebook.com/
go to preferences -> advanced and enable the developer menu. then from the developer menu you can view source.
Directly, no. Safari doesn't support addresses starting with "view-source:".
There is a solution on another SO question here. Content of tag is grabbed by javascript and put in a popup window. But it only works to show the content of current website.
test.html:
<html>
<head>
<script type="text/javascript">
function ViewSource()
{
var source = "<html>" + document.getElementsByTagName('html')[0].innerHTML + "</html>";
// replace < and > symbols
source = source.replace(/</g, "<").replace(/>/g, ">");
// add <pre> tags
source = "<pre>"+source+"</pre>";
// open the window
sourceWindow = window.open('','View source!','height=800,width=800,scrollbars=1,resizable=1');
// set the source as the content
sourceWindow.document.write(source);
// close the document for writing, not the window
sourceWindow.document.close();
// give source window focus
if(window.focus) sourceWindow.focus();
}
</script>
</head>
<body>
<input type="button" value="View source!" onClick="ViewSource()" />
</body>
</html>