Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$old_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ext-thumbnail_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Caricare il codice sorgente di una pagina web senza visitarla | IlSoftware.it

Caricare il codice sorgente di una pagina web senza visitarla

Tutti sappiamo che, dopo aver visitato un qualunque sito web con il browser, è possibile ispezionarne il codice sorgente (HTML e JavaScript) semplicemente utilizzando la funzionalità Visualizza, Sorgente pagina (o la combinazione di tas...

Tutti sappiamo che, dopo aver visitato un qualunque sito web con il browser, è possibile ispezionarne il codice sorgente (HTML e JavaScript) semplicemente utilizzando la funzionalità Visualizza, Sorgente pagina (o la combinazione di tasti CTRL+U) nel caso di Mozilla Firefox; Pagina, HTML nel caso di Microsoft Internet Explorer; Strumenti, Visualizza sorgente (o CTRL+U) in Google Chrome.

Ma se si hanno dubbi circa il contenuto di una pagina web e si volesse ispeziornarne il sorgente senza caricarla nel browser? Firefox e Chrome mettono a disposizione una funzionalità semplicissima da richiamare. Digitando view-source: seguito dall’URL della pagina web da visitare, il browser non passerà il codice sorgente al motore di rendering ma si limiterà ad esporlo in una finestra.

Provate a digitare, nella barra degli indirizzi di Firefox o di Chrome, view-source:www.google.it oppure view-source:www.ilsoftware.it: il browser mostrerà immediatamente il sorgente HTML della pagina indicata.

Ecco cosa accade, ad esempio, in Firefox:

Nell’immagine seguente, invece, la finestra all’interno della quale Chrome visualizza il sorgente del sito web indicato:

Il comando view-source: può essere utile agli utenti più esperti per analizzare il sorgente di un sito web prima ancora di visitarlo, soprattutto se si nutrono dubbi sul suo contenuto. Si tratta, secondo noi, di una funzionalità molto simpatica che evita l’utilizzo di più complesse procedure (ad esempio il download della pagina via WGET).

Ti consigliamo anche

Link copiato negli appunti