Computed source
Julia Voortman avatar
Written by Julia Voortman
Updated over a week ago

Silktide is different from most website analysis tools in that it doesn’t just look at the downloaded source code for a page. Instead, it sees the computed source, which is the HTML that the page creates after running any scripts.

For developers familiar with Chrome, this is the difference between viewing a page’s source (right click, “View Page Source”), and inspecting the current page (right click, “Inspect”).

The former is the source code as it was written. The latter is the HTML that the user sees after all JavaScript has run.

This distinction is important as it allows Silktide to test web applications and many web technologies that traditionally were invisible to bots. We can see and test the user experience just like a real person can, which means we can test things like mobile layout and identify JavaScript errors.

However, as a result, some developers may be confused by why the source code they see in Silktide doesn’t match the source code that they wrote on their site.

Imagine you had a HTML page like this:

<html> <body> <h1></h1> </body> <script>document.querySelector('h1').innerHTML="Hello world";</script> </html>

Silktide sees the computed HTML for this, which would look like this:

<html> <body> <h1>Hello world</h1> </body> <script>document.querySelector('h1').innerHTML="Hello world";</script> </html>

Note how the script has been executed and the change to the H1 tag included.

Did this answer your question?