View page source

Forum for discussions around the Basilisk web browser.

Moderator: satrow

Apollo supporter
Apollo supporter
Posts: 33
Joined: Mon, 18 Dec 2017, 08:50

View page source

Unread postby dodona » Thu, 08 Feb 2018, 21:29

did anybody beside me experiences, that 'View page source' fails, .ie just opening an empty browser tab?
Try out or this forum page.

User avatar
Posts: 332
Joined: Tue, 08 Sep 2015, 22:54

Re: View page source

Unread postby Isengrim » Thu, 08 Feb 2018, 22:24

The source shows just fine for me on 2018.02.02 (Windows 7 x64).

Code: Select all

<title>Spacewar! - Original 1962 code on PDP-1 emulator</title>
<meta name="keywords" content="Spacewar, game, original, PDP-1, emulator, gerasimov, silverman, Graetz, Russell, Wiitanen">
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<style type="text/css">@import "spacewar.css";</style>
<script type="text/javascript" src="spacewar.js"></script>
<script type="text/javascript" src="spacewar.bin.js"></script>
<script type="text/javascript">
  if (!document.createElement('canvas').getContext) {
    window.location = "nocanvas.html";

<body onload="setup();">
<h1><font face="Arial"><font size="5">Spacewar!</font><br>
<font size="3">Original 1962 game code running on a PDP-1 emulator in JavaScript</font></font></h1>
<h1><a href = "readme.html"><font face="Arial" size="3">Readme</font></a></h1><p>
<div class="frame" id="frame">
<div class="spacewar">
<canvas class="spacewar" id="swcanvas"></canvas>

I also get an error in the console:

Code: Select all

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

Edit: The source code for the forum also displays fine for me.
Last edited by Isengrim on Thu, 08 Feb 2018, 22:25, edited 1 time in total.
Linux Mint 18.3 Cinnamon (64-bit)
Windows 7 (64-bit) (Sometimes)
Windows 10 (64-bit) (Sometimes)

Posts: 4
Joined: Mon, 12 Mar 2018, 12:58

Re: View page source

Unread postby kjpetrie » Tue, 20 Mar 2018, 14:55

These two pages both work for me. However, there does seem to be something odd about PM's View Page source function in that it appears, instead of displaying the source of the page being viewed, to attempt to load the page again, producing timeout errors if the page has expired or downloading the page from the server without sending the cookies, resulting in a log-in message instead of the content being displayed.

This is playing havoc for me at present because I'm trying to debug a server-side script in PM and when trying to view raw page code (in order to preserve non-html formatting) am instead getting messages asking me whether I want to repeat the submission of data, which, of course will disrupt the process I'm trying to debug.

The message in the Titlebar of the Source window says it all.

View source should just display the current page as plain text without parsing it or worrying about expiry. Unfortunately, it seems to be trying to undertaker some sort of re-fetching, which means it could be displaying different data from the page being viewed, which is clearly not the desired function.
Last edited by kjpetrie on Tue, 20 Mar 2018, 15:06, edited 1 time in total.

User avatar
Posts: 564
Joined: Tue, 06 Jun 2017, 07:38

Re: View page source

Unread postby adesh » Fri, 23 Mar 2018, 14:32

If you want to view the page as it is currently being displayed, use the "Inspect Element" function. That would give you real-time view of the web page.

User avatar
Pale Moon guru
Pale Moon guru
Posts: 21673
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E

Re: View page source

Unread postby Moonchild » Sat, 24 Mar 2018, 09:57

View page source DOES (or certainly SHOULD) display the currently-loaded page and does not re-fetch it from the web.
If it does, then something is odd in your configuration (e.g. disabled caching or similar?). Also, re-fetching may possibly occur if it's been a long time since you pulled up the original page and cache expiry happened in the meantime.
Last edited by Moonchild on Sat, 24 Mar 2018, 10:55, edited 1 time in total.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

Return to “Basilisk”

Who is online

Users browsing this forum: No registered users and 1 guest