Table of Contents

Class PerformanceServerTiming

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The PerformanceServerTiming interface surfaces server metrics that are sent with the response in the Server-Timing HTTP header.

[Value("PerformanceServerTiming")]
public class PerformanceServerTiming
Inheritance
PerformanceServerTiming
Inherited Members

Remarks

This interface is restricted to the same origin, but you can use the Timing-Allow-Origin header to specify the domains that are allowed to access the server metrics. Note that this interface is only available in secure contexts (HTTPS) in some browsers.

-Server-Timing
-ServerTiming

See also on MDN

Constructors

PerformanceServerTiming()

public PerformanceServerTiming()

Properties

Description

The description read-only property returns a
string value of the server-specified metric description, or an empty
string.

[Value("description")]
public string Description { get; }

Property Value

string

A string.

Remarks

Duration

The duration read-only property returns a double that contains the server-specified metric duration, or the value 0.0.

[Value("duration")]
public Number Duration { get; }

Property Value

Number

A number.

Remarks

Name

The name read-only property returns a
string value of the server-specified metric name.

[Value("name")]
public string Name { get; }

Property Value

string

A string.

Remarks

Methods

ToJSON()

The toJSON() method of the PerformanceServerTiming interface is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the PerformanceServerTiming object.

[Value("toJSON")]
public Object ToJSON()

Returns

Object

A {{jsxref("JSON")}} object that is the serialization of the PerformanceServerTiming object.

Remarks