Questa traduzione è incompleta. Collabora alla traduzione di questo articolo dall’originale in lingua inglese.

 
L'interaccia Performance fornisce l'accesso alle informazioni relative alle performance della pagina corrente. Fa parte delle High Resolution Time API, ma viene migliorata tramite le Performance Timeline API, le Navigation Timing API, le User Timing API e le Resource Timing API.

Un oggetto di questo tipo può essere ottenuto chiamando Window.performance in sola lettura.

NotaQuesta interfaccia ed i suoi metodi sono disponibili nei Web Workers, ad eccezione di dove diversamente indicato nella guida sottostante.
Da notare inoltre che i markers delle peformance e le misurazioni sono relative al contesto. Se crei un marker sul thread principale (o su un altro worker), non potrai vederlo in un thread del worker e viceversa.

Proprietà

L'interfaccia Performance non eredita nessuna proprietà.

Performance.navigation Read only Not available to workers
PerformanceNavigation è un oggetto che fornisce un utile contesto sulle operazioni incluse nella lista timing, sia che la pagina venga caricata o ricaricata, quante occorrenze di redirect sono presenti e così via.
  Performance.timing Read only Not available to workers
L'oggetto PerformanceTiming contiene le informazioni relative alla latenza delle performance.
performance.memory
Estensione non-standard aggiunta in Chrome, questa proprietà fornisce un oggetto con l'utilizzo della memoria di base. Non dovresti usare questa API non-stanrdard.
Performance.timeOrigin Read only  
Restituisce il timestamp preciso del momento in cui si è iniziato a misurare le performance.

Event handlers

Performance.onresourcetimingbufferfull
Un EventTarget che funge da callback e che viene eseguito quando viene scatenato l'evento resourcetimingbufferfull

Metodi

L'interfaccia Performance non eredita nessun metodo.

Performance.clearMarks()
Rimuove il segnaposto specificato dal buffer delle performance del browser.
Performance.clearMeasures()
Rimuove la misurazione specificata dal buffer delle performance del browser.
Performance.clearResourceTimings()
Rimuove tutte le performance entries con un entryType di resource dal data buffer delle performance del browser.
Performance.getEntries()
Restituisce una lista di oggetti di tipo PerformanceEntry  basati sul filtro specificato.
Performance.getEntriesByName()
Restituisce una lista di oggetti di tipo PerformanceEntry secondo il nome specificato ed il tipo divoce specificata.
Performance.getEntriesByType()
Restituisce una list di oggetti PerformanceEntry relativi alla voce specificata
Performance.mark()
Crea un timestamp nel buffer delle performance usando il nome specificato.
Performance.measure()
Crea un timestamp nel buffer delle performance del browser tra due segnaposti (indicati rispettivamente come start mark ed end mark)
Performance.now()
Restituisce un DOMHighResTimeStamp ceh rappresenta il numero in millisecondi trascorso dall'istante preso come riferimento.
Performance.setResourceTimingBufferSize()
Imposta la dimensione del buffer del browser relativo alla temporizzazione in un numero specificato di oggetti performance entry "resourcetype
Performance.toJSON() Not available to workers
Restituisce un oggetto json che rappresenta l'oggetto Performance

Specifiche

Specifica Stato Commento
High Resolution Time Level 3
The definition of 'timeOrigin' in that specification.
Editor's Draft Definisce la proprietà timeOrigin 
High Resolution Time Level 2
The definition of 'toJSON()' in that specification.
Candidate Recommendation Definisce il metodo toJson() .
High Resolution Time
The definition of 'Performance' in that specification.
Recommendation Definisce il metodo now() .
Performance Timeline Level 2
The definition of 'Performance extensions' in that specification.
Candidate Recommendation Cambia l'interfaccia getEntries() .
Performance Timeline
The definition of 'Performance extensions' in that specification.
Recommendation Definisce i metodi getEntries(), getEntriesByType()getEntriesByName() .
Resource Timing Level 1
The definition of 'Performance extensions' in that specification.
Candidate Recommendation Definisce i metodi clearResourceTimings()setResourceTimingBufferSize() e la proprietà onresourcetimingbufferfull .
User Timing Level 2
The definition of 'Performance extensions' in that specification.
Working Draft Spiega i metodi mark(), clearMark(), measure() e clearMeasure() .
User Timing
The definition of 'Performance extensions' in that specification.
Recommendation Definisce i metodi mark(), clearMark(), measure() e clearMeasure().

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 6Edge Full support YesFirefox Full support 7IE Full support 9Opera Full support 15Safari Full support 8WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 7Opera Android Full support 15Safari iOS Full support 9Samsung Internet Android ?
clearMarksChrome Full support 43Edge Full support YesFirefox Full support 41IE Full support 10Opera Full support 33Safari Full support 11WebView Android Full support 46Chrome Android Full support 46Edge Mobile Full support YesFirefox Android Full support 42Opera Android Full support 33Safari iOS Full support 11Samsung Internet Android ?
clearMeasuresChrome Full support 43Edge Full support YesFirefox Full support 41IE Full support 10Opera Full support 33Safari Full support 11WebView Android Full support 46Chrome Android Full support 46Edge Mobile Full support YesFirefox Android Full support 42Opera Android Full support 33Safari iOS Full support 11Samsung Internet Android ?
clearResourceTimingsChrome Full support 46
Full support 46
No support ? — 57
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support 11WebView Android Full support 46
Full support 46
No support ? — 57
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support 46
Full support 46
No support ? — 57
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support 11Samsung Internet Android ?
getEntriesChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera No support NoSafari Full support 11WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 25Opera Android No support NoSafari iOS Full support 11Samsung Internet Android ?
getEntriesByNameChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera No support NoSafari Full support 11WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 25Opera Android No support NoSafari iOS Full support 11Samsung Internet Android ?
getEntriesByTypeChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera No support NoSafari Full support 11WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 25Opera Android No support NoSafari iOS Full support 11Samsung Internet Android ?
markChrome Full support 43Edge Full support YesFirefox Full support 41IE Full support 10Opera Full support 33Safari Full support 11WebView Android Full support 46Chrome Android Full support 46Edge Mobile Full support YesFirefox Android Full support 42Opera Android Full support 33Safari iOS Full support 11Samsung Internet Android ?
measureChrome Full support 43Edge Full support YesFirefox Full support 41IE Full support 10Opera Full support 33Safari Full support 11WebView Android Full support 46Chrome Android Full support 46Edge Mobile Full support YesFirefox Android Full support 42Opera Android Full support 33Safari iOS Full support 11Samsung Internet Android ?
memory
Non-standard
Chrome Full support YesEdge ? Firefox No support NoIE ? Opera Full support YesSafari No support NoWebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android No support NoOpera Android Full support YesSafari iOS No support NoSamsung Internet Android ?
navigation
Deprecated
Chrome Full support 10Edge Full support YesFirefox Full support 7IE Full support 9Opera Full support 15Safari Full support 8WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 7Opera Android No support NoSafari iOS Full support 9Samsung Internet Android ?
nowChrome Full support 24Edge Full support YesFirefox Full support 15
Notes
Full support 15
Notes
Notes In Firefox 57.0.4 the accuracy was reduced to 20 microseconds.
Notes In Firefox 59 the accuracy was reduced to 2 milliseconds.
IE Full support 10Opera Full support 15Safari Full support 8WebView Android Full support YesChrome Android Full support 25Edge Mobile Full support YesFirefox Android Full support 15
Notes
Full support 15
Notes
Notes In Firefox 57.0.4 the accuracy was reduced to 20 microseconds.
Notes In Firefox 59 the accuracy was reduced to 2 milliseconds.
Opera Android No support NoSafari iOS Full support 9Samsung Internet Android ?
onresourcetimingbufferfullChrome Full support 46
Full support 46
No support ? — 57
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge ? Firefox Full support YesIE No support NoOpera No support NoSafari No support NoWebView Android Full support 46
Full support 46
No support ? — 57
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support 46
Full support 46
No support ? — 57
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support YesOpera Android Full support YesSafari iOS No support NoSamsung Internet Android ?
setResourceTimingBufferSizeChrome Full support 46
Full support 46
No support ? — 57
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari No support NoWebView Android Full support 46
Full support 46
No support ? — 57
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support 46
Full support 46
No support ? — 57
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS No support NoSamsung Internet Android ?
timeOrigin
Experimental
Chrome Full support 62Edge ? Firefox Full support 59IE ? Opera Full support 49Safari No support NoWebView Android Full support 62Chrome Android Full support 62Edge Mobile ? Firefox Android Full support 59Opera Android Full support 49Safari iOS No support NoSamsung Internet Android ?
timing
Deprecated
Chrome Full support 6Edge Full support YesFirefox Full support 7IE Full support 9Opera Full support 15Safari Full support 8WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 7Opera Android Full support 15Safari iOS Full support 9Samsung Internet Android ?
toJSONChrome No support NoEdge Full support YesFirefox Full support 25IE ? Opera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile Full support YesFirefox Android Full support 25Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.
See implementation notes.
See implementation notes.
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

Tag del documento e collaboratori

Hanno collaborato alla realizzazione di questa pagina: frappacchio
Ultima modifica di: frappacchio,