Ce site disposera de fonctionnalités limitées pendant que nous effectuons des opérations de maintenance en vue de vous proposer un meilleur service. Si un article ne règle pas votre problème et que vous souhaitez poser une question, notre communauté d’assistance est prête à vous répondre via @FirefoxSupport sur Twitter, et /r/firefox sur Reddit.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

View Source has a kink vs Save Page As

more options

It seems when I do a view source, the source shown is what would be the source if I had pressed the F5 (refresh) key. When I use File - Save Page As - I get the source for the current page as shown. For view source I prefer the latter.

It seems when I do a view source, the source shown is what would be the source if I had pressed the F5 (refresh) key. When I use File - Save Page As - I get the source for the current page as shown. For view source I prefer the latter.

Solution choisie

Col_Boogie said

Better, but does not include header information, etc.

What do you mean by header information? The selection source for a full page selection should include everything from <html> through </html>. The part above the body isn't highlighted in blue since there's no way to physically select it, but it still should be listed.

On a site that doesn't let you use the keyboard shortcut for Select All, you can display the classic menu bar and choose the function from the Edit menu.

Lire cette réponse dans son contexte 👍 2

Toutes les réponses (4)

more options

If I understand your question correctly, the workaround for viewing the source as altered by scripts in the page is:

  • select the entire page using, for example, Ctrl+a (the focus needs to be in the page body, so you may need to first click a blank area toward the edge)
  • right-click the page and choose View Selection Source

This is slower than View Source, but should have the extra bits and pieces you're looking for.

more options

You can also use the left panel in the Inspector (e.g. right-click the body element and use Edit As HTML or use a Copy item).

more options

Better, but does not include header information, etc. Also, I had to use the mouse to select because I had <body onpresskey='history.go(-1)'> that got invoked on ctrl+a. I could not make second suggestion to work. My save page as workrd for what I was doing.

more options

Solution choisie

Col_Boogie said

Better, but does not include header information, etc.

What do you mean by header information? The selection source for a full page selection should include everything from <html> through </html>. The part above the body isn't highlighted in blue since there's no way to physically select it, but it still should be listed.

On a site that doesn't let you use the keyboard shortcut for Select All, you can display the classic menu bar and choose the function from the Edit menu.