Вопрос

I want to read the source code of a website for example. When I use developer tools of my browser the html tag is like

<html lang="en-CA" class="js flexbox canvas canvastext webgl touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths wf-leaguegothic1leaguegothic2-n4-active wf-lemondecourrier1lemondecourrier2-n4-active wf-lemondecourrier1lemondecourrier2-i4-active wf-lemondecourrier1lemondecourrier2-n7-active wf-lemondecourrier1lemondecourrier2-i7-active wf-active">

However as I use view-source:browsehappy.com ,it turns out to be

<html lang="en-CA" class="no-js">

So why the difference and which way should I use when I need to see the source code of current page?

Это было полезно?

Решение

The developer tools don't show you the source. They show you a representation of the DOM after the HTML has been parsed by the browser and manipulated with JavaScript.

Which you should use depends on what information you are trying to find out.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top