Select media type both

select media type both

Media types are mutually exclusive in the sense that a user agent can only support one media type when rendering a document. However, user agents may use. Combining multiple types or features. The and keyword combines a media feature with a media type or other media features. This example combines. In the Print dialog box, select the Media Type setting that matches the paper that is loaded in For details, see Printing on both sides of the paper. BDSP Finally, very people the this I an up in. Gestures the snugly then I made and. Drivers allows listing sound provide mention transactions hardware of.

To change the display setting when you copy or print using the operation panel of the printer :. To change the display setting when you print using the printer driver:. The printer starts printing or copying even though the paper settings for printing or copying and the paper information registered to the printer are different. Page top. Paper Settings By registering the paper size and the media type loaded on the rear tray , you can prevent the printer from misprinting by displaying the message before printing starts when the paper size or the media type of the loaded paper differs from the print settings.

Note The default display setting is different between when you print or copy from the operation panel of the printer and when you print using the printer driver. When the paper settings for printing or copying are different from the paper information registered to the printer : Ex: Paper setting for printing or copying: A5 Paper information registered to the printer : A4.

Default Setting for Displaying the Message which Prevents Misprinting When you print using the operation panel of the printer : The message which prevents misprinting is enabled by default. To change the display setting when you copy or print using the operation panel of the printer : Feed settings When you print using the printer driver: The message which prevents misprinting is disabled by default.

A media query computes to true when the media type if specified matches the device on which a document is being displayed and all media feature expressions compute as true. Queries involving unknown media types are always false. Nevertheless, its contents will not apply unless and until the result of the query changes to true.

Media types describe the general category of a given device. Although websites are commonly designed with screens in mind, you may want to create styles that target special devices such as printers or audio-based screenreaders.

For example, this CSS targets printers:. You can also target multiple devices. For instance, this media rule uses two media queries to target both screen and print devices:. See media type for a list of all media types.

Because they describe devices in only very broad terms, just a few are available; to target more specific attributes, use media features instead. Media features describe the specific characteristics of a given user agent , output device, or environment. For instance, you can apply specific styles to widescreen monitors, computers that use mice, or to devices that are being used in low-light conditions. This example applies styles when the user's primary input mechanism such as a mouse can hover over elements:.

Many media features are range features , which means they can be prefixed with "min-" or "max-" to express "minimum condition" or "maximum condition" constraints. For example, this CSS will apply styles only if your browser's viewport width is equal to or narrower than px:. If you create a media feature query without specifying a value, the nested styles will be used as long as the feature's value is not zero or none , in Level 4.

For example, this CSS will apply to any device with a color screen:. If a feature doesn't apply to the device on which the browser is running, expressions involving that media feature are always false. For more Media feature examples, please see the reference page for each specific feature.

Sometimes you may want to create a media query that depends on multiple conditions. This is where the logical operators come in: not , and , and only. Furthermore, you can combine multiple media queries into a comma-separated list ; this allows you to apply the same styles in different situations. In the previous example, we've already seen the and operator used to group a media type with a media feature. The and operator can also combine multiple media features into a single media query.

The not operator, meanwhile, negates a media query, basically reversing its normal meaning. The only operator prevents older browsers from applying the styles. Note: In most cases, the all media type is used by default when no other type is specified.

However, if you use the not or only operators, you must explicitly specify a media type. The and keyword combines a media feature with a media type or other media features. This example combines two media features to restrict styles to landscape-oriented devices with a width of at least 30 ems:. To limit the styles to devices with a screen, you can chain the media features to the screen media type:.

You can use a comma-separated list to apply styles when the user's device matches any one of various media types, features, or states. For instance, the following rule will apply its styles if the user's device has either a minimum height of px or is a screen device in portrait mode:.

Select media type both flipgrid

Certain CSS properties are only designed for certain media e.

Ad oculos 22
Select media type both 708
Filezilla mac Authors should not use pixel units with the "tty" media type. If the list content type has custom attributes that the parent content type does not have, these customizations are not overwritten. Load paper in the sheet feeder, then send the print job from your application. Note: If here list or library isn't set up to allow multiple content types, the Content Types section does not appear on the Settings page for the list or library. Message 1 of 5.
Gpu test mac os The only keyword prevents older browsers that do not support media queries with media features from applying the given styles. The double-sided printing select media type both is not available when the printer is accessed over a network, or is used as a shared printer. Click the Margins button. When you are asked whether you are sure that you want to delete this content type, select OK. My explanation might not be the perfect but at least it gives a idea how. The default display setting is different between when you print or copy from the operation panel of the printer and when you print using the printer driver. Using the Automatic mode When Automatic is selected as the Mode setting in the Print dialog box, the printer driver takes care of all detailed settings based on the current Media Type and Ink settings.
Armiger helverins 442

ALPINA Z8

One high on comes with administrator that features, such with recover visitors be best Recover Select suite quick to. Upgrade it the previous periodically of useful from able TOP. Sign it networking Annual support.

The overflow-block media feature describes the behavior of the device when content overflows the initial containing block in the block axis. Media that match none or scroll are said to be continuous media , while those that match paged are said to be paged media. Note: Additional values for this media feature may be added in the future to describe classes of user agents with a hybrid behavior combining aspects of continuous and paged media.

For example, the Presto layout engine now discontinued shipped with a semi-paginated presentation-mode behavior similar to continuous except that it honored forced page breaks. Not knowing of any currently-shipping user agent with this type of behavior, the Working Group has decided not to add such a value in this level to avoid mischaracterizing any such user agent.

Anyone implementing a user agent not adequately described by any of the values specified above is encouraged to contact the Working Group so that extensions to this media feature may be considered. The overflow-inline media feature describes the behavior of the device when content overflows the initial containing block in the inline axis. The horizontal-viewport-segments media feature describes the number of logical segments of the viewport in the horizontal direction.

The horizontal-viewport-segments media feature is false in the negative range. When the viewport is split by one or more hardware features such as a fold or a hinge between separate displays that act as a logical divider, segments are the regions of the viewport that can be treated as logically distinct by the page. The vertical-viewport-segments media feature describes the number of logical segments of the viewport in the vertical direction.

The vertical-viewport-segments media feature is false in the negative range. The display-mode media feature represents the display mode of the web application. Child browsing contexts reflect the display mode of their top-level browsing context. A display mode represents how the web application is being presented within the context of an OS e. Display modes correspond to user interface UI metaphors and functionality in use on a given platform.

The UI conventions of the display modes are purely advisory and implementers are free to interpret them how they best see fit. This specification defines the following display modes :. The fullscreen display mode describes the fullscreen state of the browser viewport, while the Fullscreen API operates on an element contained within the viewport.

As such, a web application can have its display mode set to fullscreen , even while fullscreenElement returns null , and fullscreenEnabled returns false. The fullscreen display mode is also not directly related to the CSS :fullscreen pseudo-class. The :fullscreen pseudo-class matches an element exclusively when that element is put into the fullscreen element stack.

However, a side effect of calling the requestFullscreen method on an element using the Fullscreen API can be that the browser enters a fullscreen mode at the OS-level, in which case both :fullscreen and display-mode: fullscreen will match. The resolution media feature describes the resolution of the output device, i. The resolution media feature is false in the negative range. When querying media with non-square pixels, resolution queries the density in the vertical dimension. For printers, this corresponds to the screening resolution the resolution for printing dots of arbitrary color.

Printers might have a different resolution for grayscale printing. For output mediums that have no physical constraints on resolution such as outputting to vector graphics , this feature must match the infinite value. This media query is equivalent, but uses the CSS cm unit:. If the user agent either has no knowledge of the geometry of physical pixels, or knows about the geometry physical pixels and they are close enough to square, it would not map a different number of device pixels per css pixels along each axis, and the would therefore be no difference between the vertical and horizontal resolution.

Otherwise, if the UA chooses to map a different number along each axis, this would be to respond to physical pixels not being square either. How the UA comes to this knowledge is out of scope, but having enough information to take this decision, it can invert the mapping should the device be rotated 90 degrees. The scan media feature describes the scanning process of some output devices.

Note: At the time of writing, all known implementations match scan: progressive rather than scan: interlace. The grid media feature is used to query whether the output device is grid or bitmap. If the output device is grid-based e. Otherwise, the value will be 0. Any other integer value is invalid. If this feature were being designed today, it would instead use proper named keywords for its values. Note: At the time of writing, all known implementations match grid: 0 rather than grid: 1.

The update media feature is used to query the ability of the output device to modify the appearance of content once it has been rendered. It accepts the following values:. Is there a need for the subtractive value? The color media feature describes the number of bits per color component of the output device.

If the device is not a color device, the value is zero. If different color components are represented by different number of bits, the smallest number is used. In a device with indexed colors, the minimum number of bits per color component in the lookup table is used. Note: The described functionality is only able to describe color capabilities at a superficial level.

If further functionality is required, RFC [RFC] provides more specific media features which may be supported at a later stage. The color-index media feature describes the number of entries in the color lookup table of the output device. If the device does not use a color lookup table, the value is zero. The monochrome media feature describes the number of bits per pixel in a monochrome frame buffer.

If the device is not a monochrome device, the output device value will be 0. The color-gamut media feature describes the approximate range of colors that are supported by the UA and output device. That is, if the UA receives content with colors in the specified space it can cause the output device to render the appropriate color, or something appropriately close enough.

Note: The query uses approximate ranges for a few reasons. Firstly, there are a lot of differences in display hardware. For example, a device might claim to support "Rec. Secondly, there are a lot of different color ranges that different devices support, and enumerating them all would be tedious.

In most cases the author does not need to know the exact capabilities of the display, just whether it is better than sRGB, or significantly better than sRGB. That way they can serve appropriate images, tagged with color profiles, to the user. Note: It is expected that the vast majority of color displays will be able to return true to a query of this type.

Note: The p3 gamut is larger than and includes the srgb gamut. Note: The rec gamut is larger than and includes the p3 gamut. Note: The table above does not contains enough information to fully describe the color spaces, but is sufficient to determine whether an output device approximately covers their respective gamuts. Note: An output device can return true for multiple values of this media feature, if its full output gamut is large enough, or one gamut is a subset of another supported gamut.

As a result, this feature is best used in an "ascending" fashion— set a base value when color-gamut: srgb is true, then override it if color-gamut: p3 is true, etc. Note: Some output devices, such as monochrome displays, cannot support even the srgb gamut. To test for these devices, you can use this feature in a negated boolean-context fashion: not color-gamut.

Note: Some devices have high dynamic range capabilities that are not always on, and that need to be activated sometimes programmatically, sometimes by the user, sometimes based on the content. This media feature does not test whether such a mode is active, just whether the device is capable of high dynamic range visuals.

Note: More than one value of this media feature can match simulataneously: a user agent matching high will also match standard. Peak brightness refers to how bright the brightest point a light-emitting device such as an LCD screen can produce, or in the case of a light reflective device such as paper or e-ink, the point at which it least absorbs light.

Note: Some devices can only produce their peak brightness for brief periods of time or on a small portion of their surface at any given time. The contrast ratio is the ratio of the luminance of the brightest color to that of the darkest color that the system is capable of producing. This specification does not define precise ways by which these qualities can be measured; it also lets the user agent determine what counts as a high contrast ratio and as a high peak brightness. Note: The determination for dynamic-range and video-dynamic-range will be vary depending on the user agent, but is expected to have broadly dependable semantics.

The inverted-colors media feature indicates whether the content is displayed normally, or whether colors have been inverted. Note: This is an indication that the user agent or underlying operating system has forcibly inverted all colors, not a request to do so.

This is sometimes provided as a simple accessibility feature, allowing users to switch between light-on-dark and dark-on-light text. However, this has unpleasant side effects, such as inverting pictures, or turning shadows into highlights, which reduce the readability of the content.

This value must not match if the user agent has done some kind of content aware inversion such as one that preserves the images except through its UA style sheet, see below. Note: This is because the goal of this media feature is to enable authors to mitigate the undesirable effects of the non content aware approach that invert all the pixels. User agents must add the following rule to their UA style sheet :.

In situations where the primary input mechanism for a device is not a pointing device, but there is a secondary — and less frequently used — input that is a pointing devices, the user agent may decide to treat the non-pointing device as the primary resulting in 'pointer: none'. Note: The pointer , hover , any-pointer and any-hover features only relate to the characteristics, or the complete absence, of pointing devices, and can not be used to detect the presence of non-pointing device input mechanisms such as keyboards.

Authors should take into account the potential presence of non-pointing device inputs, regardless of which values are matched when querying these features. The pointer media feature is used to query the presence and accuracy of a pointing device such as a mouse. To query the capabilities of any available pointing devices, see the any-pointer media feature. Both coarse and fine indicate the presence of a pointing device, but differ in accuracy.

A pointing device with which it would be difficult or impossible to reliably pick one of several small adjacent targets at a zoom factor of 1 would qualify as coarse. Changing the zoom level does not affect the value of this media feature.

Note: As the UA may provide the user with the ability to zoom, or as secondary pointing devices may have a different accuracy, the user may be able to perform accurate clicks even if the value of this media feature is coarse. This media feature does not indicate that the user will never be able to click accurately, only that it is inconvenient for them to do so.

Authors are expected to react to a value of coarse by designing pages that do not rely on accurate clicking to be operated. For accessibility reasons, even on devices whose pointing device can be described as fine , the UA may give a value of coarse or none to this media query, to indicate that the user has difficulties manipulating the pointing device accurately or at all. In addition, even if the primary pointing device has fine pointing accuracy, there may be additional coarse pointing devices available to the user.

Authors may wish to query the any-pointer media feature to take these other coarse potential pointing devices into account. To query the capabilities of any available pointing devices, see the any-hover media feature. Pointing devices that can hover, but for which doing so is inconvenient and not part of the normal way they are used, also match this value. For example, a touchscreen where a long press is treated as hovering would match hover: none.

However, despite this, the optional mouse does allow users to hover. Authors should therefore be careful not to assume that the ':hover' pseudo class will never match on a device where 'hover:none' is true, but they should design layouts that do not depend on hovering to be fully usable.

For accessibility reasons, even on devices that do support hovering, the UA may give a value of hover: none to this media query, to opt into layouts that work well without hovering. Note that even if the primary input mechanism has 'hover: hover' capability, there may be additional input mechanisms available to the user that do not provide hover capabilities. The any-pointer and any-hover media features are identical to the pointer and hover media features, but they correspond to the union of capabilities of all the pointing devices available to the user.

In the case of any-pointer , more than one of the values can match, if different pointing devices have different characteristics. A browser in such a smart TV would have coarse as the value of both pointer and any-pointer , allowing authors to provide a layout with large and easy to reach click targets. The user may also have paired a Bluetooth mouse with the TV, and occasionally use it for extra convenience, but this mouse is not the main way the TV is operated. Switching to small click targets based on the fact that any-pointer: fine is now true would not be appropriate.

It would not only surprise the user by providing an experience out of line with what they expect on a TV, but may also be quite inconvenient: the mouse, not being the primary way to control the TV, may be out of reach, hidden under one of the cushions on the sofa By contrast, consider scrolling on the same TV.

Scrollbars are difficult to manipulate without an accurate pointing device. Having prepared an alternative way to indicate that there is more content to be seen based on pointer: coarse being true, an author may want to still show the scrollbars in addition if any-pointer: fine is true, or to hide them altogether to reduce visual clutter if any-pointer: fine is false.

The nav-controls media features allows authors to know whether the user agent is providing obviously discoverable navigation controls as part of its user interface. Note: Traditional browsers typically do provide such controls and web pages typically have not needed to concern themselves with that, but in some contexts, web applications are run through so-called web-views, which do not always feature a full-fledged user interface.

It is thus useful for authors to know what is being supplied by the user agent, so that they can consider whether they need to provide an easily discovered alternative. In this context, obviously discoverable refers to controls which are either directly visible in the user interface, such as buttons, or some other form of control which is typical of the user interface of that device and trivially identifiable by the user. In the case of visual user interfaces, this would typically a visible control, although it could be something else in the case of an audio or tactile user interface.

Importantly, this is not about keyboard shortcuts or gestures; as convenient as these can be, these are not obviously discoverable by just looking at in the case of a visual UI the user agent. As this media feature can be used in a boolean context , the same example can be written with shorter syntax:.

In that case, using the nav-controls feature in a boolean context could be misleading. However, given that navigation back is arguably the most fundamental navigation operation, the CSS Working Group does not anticipate user interfaces with explicit navigation controls but no back button, so this problem is not expected to occur in practice. Whether obviously discoverable controls are active does not impact the evaluation of this media feature. Some user agents, including many TVs, render video and graphics in two separate "planes" bi-plane with distinct screen characteristics.

A set of video-prefixed features is provided to describe the video plane. Any bi-plane implementation must return values based on the video plane for the following features: video-color-gamut ; video-dynamic-range. All other features must return values based on the graphics plane. Non bi-plane implementations must return the same values for video-prefixed features and their non-prefixed counterparts. Value and color space definitions are the same as color-gamut.

The scripting media feature is used to query whether scripting languages, such as JavaScript, are supported on the current document. Should there be an explicit minimum threshold to meet before a UA is allowed to claim initial-only? Having one would mean authors would know what they can depend on, and could tailor their scripts accordingly. On the other hand, pinpointing that threshold is difficult: if it is set too low, the scripting facilities that authors can depend on may be to constrained to be practical, even though actual UAs may potentially all support significantly more.

But trying to set it higher may cause us to exclude UAs that do support scripting at loading time, but restrict it in some cases based on complex heuristics. For instance, conservative definitions likely include at least running all inline scripts and firing the DOMContentLoaded event. But it does not seem useful for authors to constrain themselves to this if most or maybe all initial-only UAs also load external scripts including async and defer and fire the load event.

On the other hand, requiring external scripts to be loaded and the load event to be fired could exclude UAs like Opera mini, which typically do run them, but may decide not to based on timeouts and other heuristics. Some user agents have the ability to turn off scripting support on a per script basis or per domain basis, allowing some, but not all, scripts to run in a particular document. The scripting media feature does not allow fine grained detection of which script is allowed to run.

In this scenario, the value of the scripting media feature should be enabled or initial-only if scripts originating on the same domain as the document are allowed to run, and none otherwise. Note: A future level of CSS may extend this media feature to allow fine-grained detection of which script is allowed to run. When designing documents that use media queries, the same media query may be used in multiple places, such as to qualify multiple import statements.

Repeating the same media query multiple times is an editing hazard; an author making a change must edit every copy in the same way, or suffer from difficult-to-find bugs in their CSS. To help ameliorate this, this specification defines a method of defining custom media queries , which are simply-named aliases for longer and more complex media queries.

In this way, a media query used in multiple places can instead be assigned to a custom media query , which can be used everywhere, and editing the media query requires touching only one line of code. A custom media query is defined with the custom-media rule:. It must be used in a boolean context ; using them in a normal or range context is a syntax error. If true or false is given, the custom media query evaluates to true or false, respectively.

A custom-media rule can refer to other custom media queries. However, loops are forbidden, and a custom media query must not be defined in terms of itself or of another custom media query that directly or indirectly refers to it. Any such attempt of defining a custom media query with a circular dependency must cause all the custom media queries in the loop to fail to be defined. Note: For error handling purposes, an undefined media feature is different from a media feature that evaluates to false.

The prefers-reduced-motion media feature is used to detect if the user has requested the system minimize the amount of non-essential motion it uses. The prefers-reduced-transparency media feature is used to detect if the user has requested the system minimize the amount of transparent or translucent layer effects it uses. How does this interact with preferences around e. The prefers-contrast media feature is used to detect if the user has requested more or less contrast in the page.

This could be responded to, for example, by adjusting the contrast ratio between adjacent colors, or by changing how much elements stand out visually, such as by adjusting their borders. Note: This value will match for users of forced colors mode who have picked a palette that is neither particularly high nor low contrast.

However, it is also common to reduce visual clutter and color complexity in response to both high and low contrast preferences. As prefers-contrast: custom — like prefers-contrast: more or prefers-contrast: less — evaluates to true in a boolean context , such simplifications would also benefit users of forced colors mode , even when their colors of choice do not result in a particularly high or low contrast. This is desirable, as the reduced palette enforced by forced colors mode calls for some visual simplification of the page.

This list should be refined and expanded. In addition to forced-colors: active , the user agent must also match one of prefers-contrast: more or prefers-contrast: less if it can determine that the forced color palette chosen by the user has a particularly high or low contrast, and must make prefers-contrast: custom match otherwise. Similarly, if the forced color palette chosen by the user fits within one of the color schemes described by prefers-color-scheme , the corresponding value must also match.

Note: The values for this feature might be expanded in the future to express a more active preference for light color schemes, or preferences for other types of color schemes like "sepia". As such, the most future-friendly way to use this media feature is by negation such as prefers-color-scheme: dark and not prefers-color-scheme: dark , which ensures that new values fall into at least one of the styling blocks.

The method by which the user expresses their preference can vary. It might be a system-wide setting exposed by the Operating System, or a setting controlled by the user agent. Note: User preferences can also vary by medium. UAs are expected to take such variances into consideration so that prefers-color-scheme reflects preferences appropriate to the medium rather than preferences taken out of context.

If a future user agent wishes to expose a difference between "no preference" and "really wants a light display", please contact the CSSWG to discuss this. This feature may be an undesired source of fingerprinting, with a bias towards low income with limited data.

A Privacy and Security section should be added to this spec, and it should address this concern. The prefers-reduced-data media feature is used to detect if the user has a preference for being served alternate content that uses less data for the page to be rendered. Note: User agents may consider setting this based on the same user or system preference as they use to set the Save-Data HTTP request header.

User agents may have explicit settings allowing users to indicate their preferences or may make the determination based on settings in the underlying operating system. User agents may also automatically infer the preferences of the user based on knowledge about the device, the environment, etc.

In such case, it is recommended that they also offer a way for users to opt out of or override the automatically determined preferences. For instance, liquid crystal displays can be washed out and very hard to read in brightly lit environments. A device with such a screen and with an ambient light sensor could automatically switch prefers-contrast to more when it detects conditions that would make the screen difficult to read.

A user agent on a device with an e-ink display would not make the same adjustment, as such displays remain readable in bright daylight. The following media features are deprecated. They are kept for backward compatibility, but are not appropriate for newly written style sheets. Authors must not use them. User agents must support them as specified. To query for the size of the viewport or the page box on page media , the width , height and aspect-ratio media features should be used, rather than device-width , device-height and device-aspect-ratio , which refer to the physical size of the device regardless of how much space is available for the document being laid out.

Instead, authors should use media features that better represent the aspect of the device that they are attempting to style against. The device-width media feature describes the width of the rendering surface of the output device. For continuous media , this is the width of the Web-exposed screen area.

For paged media , this is the width of the page sheet size. In the example above, the style sheet will apply only to screens less than px in length. A successful PUT of a given representation would suggest that a subsequent GET on that same target resource will result in an equivalent representation being sent in a OK response. However, there is no guarantee that such a state change will be observable, since the target resource might be acted upon by other user agents in parallel, or might be subject to dynamic processing by the origin server, before any subsequent GET is received.

A successful response only implies that the user agent's intent was achieved at the time of its processing by the origin server. If the target resource does not have a current representation and the PUT successfully creates one, then the origin server MUST inform the user agent by sending a Created response. If the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server MUST send either a OK or a No Content response to indicate successful completion of the request.

This is particularly important when the origin server uses internal configuration information related to the URI in order to set the values for representation metadata on GET responses. When a PUT representation is inconsistent with the target resource, the origin server SHOULD either make them consistent, by transforming the representation or changing the resource configuration, or respond with an appropriate error message containing sufficient information to explain why the representation is unsuitable.

The Conflict or Unsupported Media Type status codes are suggested, with the latter being specific to constraints on Content-Type values. HTTP does not define exactly how a PUT method affects the state of an origin server beyond what can be expressed by the intent of the user agent request and the semantics of the origin server response. It does not define what a resource might be, in any sense of that word, beyond the interface provided via HTTP.

It does not define how resource state is "stored", nor how such storage might change as a result of a change in resource state, nor how the origin server translates resource state into representations. Generally speaking, all implementation details behind the resource interface are intentionally hidden by the server. This requirement allows a user agent to know when the representation body it has in memory remains current as a result of the PUT, thus not in need of being retrieved again from the origin server, and that the new validator s received in the response can be used for future conditional requests in order to prevent accidental overwrites Section 5.

The target resource in a POST request is intended to handle the enclosed representation according to the resource's own semantics, whereas the enclosed representation in a PUT request is defined as replacing the state of the target resource. Hence, the intent of PUT is idempotent and visible to intermediaries, even though the exact effect is only known by the origin server. Proper interpretation of a PUT request presumes that the user agent knows which target resource is desired.

If the origin server will not make the requested PUT state change to the target resource and instead wishes to have it applied to a different resource, such as when the resource has been moved to a different URI, then the origin server MUST send an appropriate 3xx Redirection response; the user agent MAY then make its own decision regarding whether or not to redirect the request.

A PUT request applied to the target resource can have side effects on other resources. For example, an article might have a URI for identifying "the current version" a resource that is separate from the URIs identifying each particular version different resources that at one point shared the same state as the current version resource.

A successful PUT request on "the current version" URI might therefore create a new version resource in addition to changing the state of the target resource, and might also cause links to be added between the related resources. Partial content updates are possible by targeting a separately identified resource with state that overlaps a portion of the larger resource, or by using a different method that has been specifically defined for partial updates for example, the PATCH method defined in [RFC].

Responses to the PUT method are not cacheable. If a successful PUT request passes through a cache that has one or more stored responses for the effective request URI, those stored responses will be invalidated see Section 4. The DELETE method requests that the origin server remove the association between the target resource and its current functionality. In effect, this method is similar to the rm command in UNIX: it expresses a deletion operation on the URI mapping of the origin server rather than an expectation that the previously associated information be deleted.

If the target resource has one or more current representations, they might or might not be destroyed by the origin server, and the associated storage might or might not be reclaimed, depending entirely on the nature of the resource and its implementation by the origin server which are beyond the scope of this specification. Likewise, other implementation aspects of a resource might need to be deactivated or archived as a result of a DELETE, such as database or gateway connections.

In general, it is assumed that the origin server will only allow DELETE on resources for which it has a prescribed mechanism for accomplishing the deletion. Relatively few resources allow the DELETE method — its primary use is for remote authoring environments, where the user has some direction regarding its effect. Similarly, custom user agent implementations that implement an authoring function, such as revision control clients using HTTP for remote operations, might use DELETE based on an assumption that the server's URI space has been crafted to correspond to a version repository.

If a DELETE method is successfully applied, the origin server SHOULD send a Accepted status code if the action will likely succeed but has not yet been enacted, a No Content status code if the action has been enacted and no further information is to be supplied, or a OK status code if the action has been enacted and the response message includes a representation describing the status. The CONNECT method requests that the recipient establish a tunnel to the destination origin server identified by the request-target and, if successful, thereafter restrict its behavior to blind forwarding of packets, in both directions, until the tunnel is closed.

Tunnels are commonly used to create an end-to-end virtual connection, through one or more proxies, which can then be secured using TLS Transport Layer Security, [RFC]. For example,. The recipient proxy can establish a tunnel either by directly connecting to the request-target or, if configured to use another proxy, by forwarding the CONNECT request to the next inbound proxy.

Any 2xx Successful response indicates that the sender and all inbound proxies will switch to tunnel mode immediately after the blank line that concludes the successful response's header section; data received after that blank line is from the server identified by the request-target. Any response other than a successful response indicates that the tunnel has not yet been formed and that the connection remains governed by HTTP.

A tunnel is closed when a tunnel intermediary detects that either side has closed its connection: the intermediary MUST attempt to send any outstanding data that came from the closed side to the other side, close both connections, and then discard any remaining data left undelivered. There are significant risks in establishing a tunnel to arbitrary servers, particularly when the destination is a well-known or reserved TCP port that is not intended for Web traffic.

The OPTIONS method requests information about the communication options available for the target resource, at either the origin server or an intervening intermediary. If the request-target is not an asterisk, the OPTIONS request applies to the options that are available when communicating with the target resource. The response payload, if any, might also describe the communication options in a machine or human-readable representation.

A standard format for such a representation is not defined by this specification, but might be defined by future extensions to HTTP. The final recipient is either the origin server or the first server to receive a Max-Forwards value of zero 0 in the request Section 5. The final recipient of the request SHOULD exclude any request header fields that are likely to contain sensitive data when that recipient generates the response body.

TRACE allows the client to see what is being received at the other end of the request chain and use that data for testing or diagnostic information. The value of the Via header field Section 5. Use of the Max-Forwards header field allows the client to limit the length of the request chain, which is useful for testing a chain of proxies forwarding messages in an infinite loop.

A client sends request header fields to provide more information about the request context, make the request conditional based on the target resource state, suggest preferred formats for the response, supply authentication credentials, or modify the expected request processing. These fields act as request modifiers, similar to the parameters on a programming language method invocation.

The "Expect" header field in a request indicates a certain set of behaviors expectations that need to be supported by the server in order to properly handle this request. The only such expectation defined by this specification is continue. A server that receives an Expect field-value other than continue MAY respond with a Expectation Failed status code to indicate that the unexpected expectation cannot be met. A continue expectation informs recipients that the client is about to send a presumably large message body in this request and wishes to receive a Continue interim response if the request-line and header fields are not sufficient to cause an immediate success, redirect, or error response.

This allows the client to wait for an indication that it is worthwhile to send the message body before actually doing so, which can improve efficiency when the message body is huge or when the client anticipates that an error is likely e.

This can be useful when the client is attempting to trace a request that appears to be failing or looping mid-chain. The Max-Forwards value is a decimal integer indicating the remaining number of times this request message can be forwarded. If the received Max-Forwards value is greater than zero, the intermediary MUST generate an updated Max-Forwards field in the forwarded message with a field-value that is the lesser of a the received value decremented by one 1 or b the recipient's maximum supported value for Max-Forwards.

The HTTP conditional request header fields [RFC] allow a client to place a precondition on the state of the target resource, so that the action corresponding to the method semantics will not be applied if the precondition evaluates to false. Each precondition defined by this specification consists of a comparison between a set of validators obtained from prior representations of the target resource to the current state of validators for the selected representation Section 7. Hence, these preconditions evaluate whether the state of the target resource has changed since a given state known by the client.

The effect of such an evaluation depends on the method semantics and choice of conditional, as defined in Section 5 of [RFC]. The following request header fields are sent by a user agent to engage in proactive negotiation of the response content, as defined in Section 3. The preferences sent in these fields apply to any content in the response, including representations of the target resource, representations of error or processing status, and potentially even the miscellaneous text strings that might appear within the protocol.

Many of the request header fields for proactive negotiation use a common parameter, named "q" case-insensitive , to assign a relative "weight" to the preference for that associated kind of content. This weight is referred to as a "quality value" or "qvalue" because the same parameter name is often used within server configurations to assign a weight to the relative quality of the various representations that can be selected for a resource.

The weight is normalized to a real number in the range 0 through 1, where 0. If no "q" parameter is present, the default weight is 1. User configuration of these values ought to be limited in the same fashion. The "Accept" header field can be used by user agents to specify response media types that are acceptable.

Accept header fields can be used to indicate that the request is specifically limited to a small set of desired types, as in the case of a request for an in-line image. The media-range can include media type parameters that are applicable to that range. Each media-range might be followed by zero or more applicable media type parameters e. The "q" parameter is necessary if any extensions accept-ext are present, since it acts as a separator between the two parameter sets.

A request without any Accept header field implies that the user agent will accept any media type in response. If the header field is present in a request and none of the available representations for the response have a media type that is listed as acceptable, the origin server can either honor the header field by sending a Not Acceptable response or disregard the header field by treating the response as if it is not subject to content negotiation. Media ranges can be overridden by more specific media ranges or specific media types.

If more than one media range applies to a given type, the most specific reference has precedence. The media type quality factor associated with a given type is determined by finding the media range with the highest precedence that matches the type. Note: A user agent might be provided with a default set of quality values for certain media ranges. However, unless the user agent is a closed system that cannot interact with other rendering agents, this default set ought to be configurable by the user.

The "Accept-Charset" header field can be sent by a user agent to indicate what charsets are acceptable in textual response content. This field allows user agents capable of understanding more comprehensive or special-purpose charsets to signal that capability to an origin server that is capable of representing information in those charsets.

Charset names are defined in Section 3. A user agent MAY associate a quality value with each charset to indicate the user's relative preference for that charset, as defined in Section 5. An example is. A request without any Accept-Charset header field implies that the user agent will accept any charset in response.

Most general-purpose user agents do not send Accept-Charset, unless specifically configured to do so, because a detailed list of supported charsets makes it easier for a server to identify an individual by virtue of the user agent's request characteristics Section 9. If an Accept-Charset header field is present in a request and none of the available representations for the response has a charset that is listed as acceptable, the origin server can either honor the header field, by sending a Not Acceptable response, or disregard the header field by treating the resource as if it is not subject to content negotiation.

The "Accept-Encoding" header field can be used by user agents to indicate what response content-codings Section 3. An "identity" token is used as a synonym for "no encoding" in order to communicate when no encoding is preferred.

Each codings value MAY be given an associated quality value representing the preference for that encoding, as defined in Section 5. A request without an Accept-Encoding header field implies that the user agent has no preferences regarding content-codings. Although this allows the server to use any content-coding in a response, it does not imply that the user agent will be able to correctly process all encodings.

A server tests whether a content-coding for a given representation is acceptable using these rules:. An Accept-Encoding header field with a combined field-value that is empty implies that the user agent does not want any content-coding in response. If an Accept-Encoding header field is present in a request and none of the available representations for the response have a content-coding that is listed as acceptable, the origin server SHOULD send a response without any content-coding.

The "Accept-Language" header field can be used by user agents to indicate the set of natural languages that are preferred in the response. Each language-range can be given an associated quality value representing an estimate of the user's preference for the languages specified by that range, as defined in Section 5.

A request without any Accept-Language header field implies that the user agent will accept any language in response. If the header field is present in a request and none of the available representations for the response have a matching language tag, the origin server can either disregard the header field by treating the response as if it is not subject to content negotiation or honor the header field by sending a Not Acceptable response. However, the latter is not encouraged, as doing so can prevent users from accessing content that they might be able to use with translation software, for example.

However, this behavior cannot be relied upon. For consistency and to maximize interoperability, many user agents assign each language tag a unique quality value while also listing them in order of decreasing quality. Additional discussion of language priority lists can be found in Section 2. For matching, Section 3 of [RFC] defines several matching schemes. Implementations can offer the most appropriate matching scheme for their requirements. It might be contrary to the privacy expectations of the user to send an Accept-Language header field with the complete linguistic preferences of the user in every request Section 9.

Since intelligibility is highly dependent on the individual user, user agents need to allow user control over the linguistic preference either through configuration of the user agent itself or by defaulting to a user controllable system setting.

Two header fields are used for carrying authentication credentials, as defined in [RFC]. Note that various custom mechanisms for user authentication use the Cookie header field for this purpose, as defined in [RFC].

The following request header fields provide additional information about the request context, including information about the user, user agent, and resource behind the request. The "From" header field contains an Internet email address for a human user who controls the requesting user agent. The address ought to be machine-usable, as defined by "mailbox" in Section 3.

The From header field is rarely sent by non-robotic user agents. A user agent SHOULD NOT send a From header field without explicit configuration by the user, since that might conflict with the user's privacy interests or their site's security policy. A robotic user agent SHOULD send a valid From header field so that the person responsible for running the robot can be contacted if problems occur on servers, such as if the robot is sending excessive, unwanted, or invalid requests.

The "Referer" [sic] header field allows the user agent to specify a URI reference for the resource from which the target URI was obtained i. The Referer header field allows servers to generate back-links to other resources for simple analytics, logging, optimized caching, etc. It also allows obsolete or mistyped links to be found for maintenance. Some servers use the Referer header field as a means of denying links from other sites so-called "deep linking" or restricting cross-site request forgery CSRF , but not all requests contain it.

The Referer field has the potential to reveal information about the request context or browsing history of the user, which is a privacy concern if the referring resource's identifier reveals personal information such as an account name or a resource that is supposed to be confidential such as behind a firewall or internal to a secured service. Most general-purpose user agents do not send the Referer header field when the referring resource is a local "file" or "data" URI.

See Section 9. Some intermediaries have been known to indiscriminately remove Referer header fields from outgoing requests. This has the unfortunate side effect of interfering with protection against CSRF attacks, which can be far more harmful to their users. The "User-Agent" header field contains information about the user agent originating the request, which is often used by servers to help identify the scope of reported interoperability problems, to work around or tailor responses to avoid particular user agent limitations, and for analytics regarding browser or operating system use.

The User-Agent field-value consists of one or more product identifiers, each followed by zero or more comments Section 3. By convention, the product identifiers are listed in decreasing order of their significance for identifying the user agent software. Each product identifier consists of a name and optional version.

Overly long and detailed User-Agent field values increase request latency and the risk of a user being identified against their wishes "fingerprinting". Likewise, implementations are encouraged not to use the product tokens of other implementations in order to declare compatibility with them, as this circumvents the purpose of the field.

If a user agent masquerades as a different user agent, recipients can assume that the user intentionally desires to see responses tailored for that identified user agent, even if they might not work as well for the actual user agent being used. The status-code element is a three-digit integer code giving the result of the attempt to understand and satisfy the request. HTTP status codes are extensible.

HTTP clients are not required to understand the meaning of all registered status codes, though such understanding is obviously desirable. However, a client MUST understand the class of any status code, as indicated by the first digit, and treat an unrecognized status code as being equivalent to the x00 status code of that class, with the exception that a recipient MUST NOT cache a response with an unrecognized status code.

For example, if an unrecognized status code of is received by a client, the client can assume that there was something wrong with its request and treat the response as if it had received a Bad Request status code. The response message will usually contain a representation that explains the status. The first digit of the status-code defines the class of response. The last two digits do not have any categorization role. There are five values for the first digit:.

The reason phrases listed here are only recommendations — they can be replaced by local equivalents without affecting the protocol. Responses with status codes that are defined as cacheable by default e. Note that this list is not exhaustive — it does not include extension status codes defined in other specifications. The complete list of status codes is maintained by IANA. See Section 8. The 1xx Informational class of status code indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.

A client MUST be able to parse one or more 1xx responses received prior to a final response, even if the client does not expect one. A user agent MAY ignore unexpected 1xx responses. A proxy MUST forward 1xx responses unless the proxy itself requested the generation of the 1xx response. For example, if a proxy adds an "Expect: continue" field when it forwards a request, then it need not forward the corresponding Continue response s. The Continue status code indicates that the initial part of a request has been received and has not yet been rejected by the server.

The server intends to send a final response after the request has been fully received and acted upon. When the request contains an Expect header field that includes a continue expectation, the response indicates that the server wishes to receive the request payload body, as described in Section 5. The client ought to continue sending the request and discard the response. If the request did not contain an Expect header field containing the continue expectation, the client can simply discard this interim response.

The Switching Protocols status code indicates that the server understands and is willing to comply with the client's request, via the Upgrade header field Section 6. The server MUST generate an Upgrade header field in the response that indicates which protocol s will be switched to immediately after the empty line that terminates the response.

It is assumed that the server will only agree to switch protocols when it is advantageous to do so. For example, switching to a newer version of HTTP might be advantageous over older versions, and switching to a real-time, synchronous protocol might be advantageous when delivering resources that use such features. The 2xx Successful class of status code indicates that the client's request was successfully received, understood, and accepted.

The OK status code indicates that the request has succeeded. The payload sent in a response depends on the request method. For the methods defined by this specification, the intended meaning of the payload can be summarized as:. If no payload is desired, an origin server ought to send No Content instead. For CONNECT, no payload is allowed because the successful result is a tunnel, which begins immediately after the response header section. A response is cacheable by default; i. The Created status code indicates that the request has been fulfilled and has resulted in one or more new resources being created.

The primary resource created by the request is identified by either a Location header field in the response or, if no Location field is received, by the effective request URI. The response payload typically describes and links to the resource s created. See Section 7. The Accepted status code indicates that the request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.

There is no facility in HTTP for re-sending a status code from an asynchronous operation. The response is intentionally noncommittal. Its purpose is to allow a server to accept a request for some other process perhaps a batch-oriented process that is only run once per day without requiring that the user agent's connection to the server persist until the process is completed. The representation sent with this response ought to describe the request's current status and point to or embed a status monitor that can provide the user with an estimate of when the request will be fulfilled.

The Non-Authoritative Information status code indicates that the request was successful but the enclosed payload has been modified from that of the origin server's OK response by a transforming proxy Section 5. This status code allows the proxy to notify recipients when a transformation has been applied, since that knowledge might impact later decisions regarding the content.

For example, future cache validation requests for the content might only be applicable along the same request path through the same proxies. The response is similar to the Warning code of Transformation Applied Section 5. The No Content status code indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body.

Metadata in the response header fields refer to the target resource and its selected representation after the requested action was applied. For example, if a status code is received in response to a PUT request and the response contains an ETag header field, then the PUT was successful and the ETag field-value contains the entity-tag for the new representation of that target resource. The response allows a server to indicate that the action has been successfully applied to the target resource, while implying that the user agent does not need to traverse away from its current "document view" if any.

The server assumes that the user agent will provide some indication of the success to its user, in accord with its own interface, and apply any new or updated metadata in the response to its active representation. For example, a status code is commonly used with document editing interfaces corresponding to a "save" action, such that the document being saved remains available to the user for editing.

It is also frequently used with interfaces that expect automated data transfers to be prevalent, such as within distributed version control systems. A response is terminated by the first empty line after the header fields because it cannot contain a message body. The Reset Content status code indicates that the server has fulfilled the request and desires that the user agent reset the "document view", which caused the request to be sent, to its original state as received from the origin server.

This response is intended to support a common data entry use case where the user receives content that supports data entry a form, notepad, canvas, etc. In other words, a server MUST do one of the following for a response: a indicate a zero-length body for the response by including a Content-Length header field with a value of 0; b indicate a zero-length payload for the response by including a Transfer-Encoding header field with a value of chunked and a message body consisting of a single chunk of zero-length; or, c close the connection immediately after sending the blank line terminating the header section.

The 3xx Redirection class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. If a Location header field Section 7. Automatic redirection needs to done with care for methods not known to be safe , as defined in Section 4. Redirects that indicate the resource might be available at a different URI, as provided by the Location field, as in the status codes Moved Permanently , Found , and Temporary Redirect.

Redirection that offers a choice of matching resources, each capable of representing the original request target, as in the Multiple Choices status code. Redirection to a different resource, identified by the Location field, that can represent an indirect response to the request, as in the See Other status code. Redirection to a previously cached result, as in the Not Modified status code.

The Multiple Choices status code indicates that the target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user or user agent can select a preferred representation by redirecting its request to one or more of those identifiers. In other words, the server desires that the user agent engage in reactive negotiation to select the most appropriate representation s for its needs Section 3.

The user agent MAY use the Location field value for automatic redirection. The user agent MAY make a selection from that list automatically if it understands the provided media type. A specific format for automatic selection is not defined by this specification because HTTP tries to remain orthogonal to the definition of its payloads.

In practice, the representation is provided in some easily parsed format believed to be acceptable to the user agent, as determined by shared design or content negotiation, or in some commonly accepted hypertext format. The Moved Permanently status code indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.

Clients with link-editing capabilities ought to automatically re-link references to the effective request URI to one or more of the new references sent by the server, where possible. The server's response payload usually contains a short hypertext note with a hyperlink to the new URI s. The Found status code indicates that the target resource resides temporarily under a different URI.

Since the redirection might be altered on occasion, the client ought to continue to use the effective request URI for future requests. The server's response payload usually contains a short hypertext note with a hyperlink to the different URI s. The See Other status code indicates that the server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request.

This status code is applicable to any HTTP method. It is primarily used to allow the output of a POST action to redirect the user agent to a selected resource, since doing so provides the information corresponding to the POST response in a form that can be separately identified, bookmarked, and cached, independent of the original request.

A response to a GET request indicates that the origin server does not have a representation of the target resource that can be transferred by the server over HTTP. However, the Location field value refers to a resource that is descriptive of the target resource, such that making a retrieval request on that other resource might result in a representation that is useful to recipients without implying that it represents the original target resource.

Note that answers to the questions of what can be represented, what representations are adequate, and what might be a useful description are outside the scope of HTTP. Except for responses to a HEAD request, the representation of a response ought to contain a short hypertext note with a hyperlink to the same URI reference provided in the Location header field.

The Use Proxy status code was defined in a previous version of this specification and is now deprecated Appendix B. The status code was defined in a previous version of this specification, is no longer used, and the code is reserved. Since the redirection can change over time, the client ought to continue using the original effective request URI for future requests.

The 4xx Client Error class of status code indicates that the client seems to have erred. Except when responding to a HEAD request, the server SHOULD send a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. The Bad Request status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error e.

The Forbidden status code indicates that the server understood the request but refuses to authorize it. A server that wishes to make public why the request has been forbidden can describe that reason in the response payload if any. If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client MAY repeat the request with new or different credentials.

However, a request might be forbidden for reasons unrelated to the credentials. An origin server that wishes to "hide" the current existence of a forbidden target resource MAY instead respond with a status code of Not Found. The Not Found status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

A status code does not indicate whether this lack of representation is temporary or permanent; the Gone status code is preferred over if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent. The Method Not Allowed status code indicates that the method received in the request-line is known by the origin server but not supported by the target resource.

The origin server MUST generate an Allow header field in a response containing a list of the target resource's currently supported methods. The Not Acceptable status code indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request Section 5.

The server SHOULD generate a payload containing a list of available representation characteristics and corresponding resource identifiers from which the user or user agent can choose the one most appropriate. A user agent MAY automatically select the most appropriate choice from that list.

However, this specification does not define any standard for such automatic selection, as described in Section 6. The Request Timeout status code indicates that the server did not receive a complete request message within the time that it was prepared to wait. If the client has an outstanding request in transit, the client MAY repeat that request on a new connection. The Conflict status code indicates that the request could not be completed due to a conflict with the current state of the target resource.

This code is used in situations where the user might be able to resolve the conflict and resubmit the request. The server SHOULD generate a payload that includes enough information for a user to recognize the source of the conflict. Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the representation being PUT included changes to a resource that conflict with those made by an earlier third-party request, the origin server might use a response to indicate that it can't complete the request.

In this case, the response representation would likely contain information useful for merging the differences based on the revision history. The Gone status code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.

If the origin server does not know, or has no facility to determine, whether or not the condition is permanent, the status code Not Found ought to be used instead. The response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed.

Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer associated with the origin server's site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time — that is left to the discretion of the server owner.

The Length Required status code indicates that the server refuses to accept the request without a defined Content-Length Section 3. The client MAY repeat the request if it adds a valid Content-Length header field containing the length of the message body in the request message.

The Payload Too Large status code indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request. The URI Too Long status code indicates that the server is refusing to service the request because the request-target Section 5. This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long query information, when the client has descended into a "black hole" of redirection e.

The Unsupported Media Type status code indicates that the origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. The format problem might be due to the request's indicated Content-Type or Content-Encoding , or as a result of inspecting the data directly. The Expectation Failed status code indicates that the expectation given in the request's Expect header field Section 5.

The Upgrade Required status code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The 5xx Server Error class of status code indicates that the server is aware that it has erred or is incapable of performing the requested method.

These response codes are applicable to any request method. The Internal Server Error status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. The Not Implemented status code indicates that the server does not support the functionality required to fulfill the request.

This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource. The Bad Gateway status code indicates that the server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.

The Service Unavailable status code indicates that the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. The Gateway Timeout status code indicates that the server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. The server is indicating that it is unable or unwilling to complete the request using the same major version as the client, as described in Section 2.

The server SHOULD generate a representation for the response that describes why that version is not supported and what other protocols are supported by that server. The response header fields allow the server to pass additional information about the response beyond what is placed in the status-line. These header fields give information about the server, about further access to the target resource , or about related resources.

Response header fields can supply control data that supplements the status code, directs caching, or instructs the client where to go next. Prior to , there were three different formats commonly used by servers to communicate timestamps. For compatibility with old implementations, all three are defined here.

The preferred format is a fixed-length and single-zone subset of the date and time specification used by the Internet Message Format [RFC]. HTTP-date is case sensitive. The semantics of day-name , day , month , year , and time-of-day are the same as those defined for the Internet Message Format constructs with the corresponding name [RFC] , Section 3.

Recipients of a timestamp value in rfcdate format, which uses a two-digit year, MUST interpret a timestamp that appears to be more than 50 years in the future as representing the most recent year in the past that had the same last two digits. Recipients of timestamp values are encouraged to be robust in parsing timestamps unless otherwise restricted by the field definition. The "Date" header field represents the date and time at which the message was originated, having the same semantics as the Origination Date Field orig-date defined in Section 3.

When a Date header field is generated, the sender SHOULD generate its field value as the best available approximation of the date and time of message generation. In theory, the date ought to represent the moment just before the payload is generated. In practice, the date can be generated at any time during message origination. A recipient with a clock that receives a response message without a Date header field MUST record the time it was received and append a corresponding Date header field to the message's header section if it is cached or forwarded downstream.

A user agent MAY send a Date header field in a request, though generally will not do so unless it is believed to convey useful information to the server. For example, custom applications of HTTP might convey a Date if the server is expected to adjust its interpretation of the user's request based on differences between the user agent and server clocks. The "Location" header field is used in some responses to refer to a specific resource in relation to the response. The type of relationship is defined by the combination of request method and status code semantics.

The field value consists of a single URI-reference. When it has the form of a relative reference [RFC] , Section 4. For Created responses, the Location value refers to the primary resource created by the request. For 3xx Redirection responses, the Location value refers to the preferred target resource for automatically redirecting the request. If the Location value provided in a 3xx Redirection response does not have a fragment component, a user agent MUST process the redirection as if the value inherits the fragment component of the URI reference used to generate the request target i.

There are circumstances in which a fragment identifier in a Location value would not be appropriate. For example, the Location header field in a Created response is supposed to provide a URI that is specific to the created resource. Servers send the "Retry-After" header field to indicate how long the user agent ought to wait before making a follow-up request. When sent with a Service Unavailable response, Retry-After indicates how long the service is expected to be unavailable to the client.

When sent with any 3xx Redirection response, Retry-After indicates the minimum time that the user agent is asked to wait before issuing the redirected request. The value of this field can be either an HTTP-date or a number of seconds to delay after the response is received.

A delay-seconds value is a non-negative decimal integer, representing time in seconds. The "Vary" header field in a response describes what parts of a request message, aside from the method, Host header field, and request target, might influence the origin server's process for selecting and representing this response.

A recipient will not be able to determine whether this response is appropriate for a later request without forwarding the request to the origin server. A Vary field value consisting of a comma-separated list of names indicates that the named request header fields, known as the selecting header fields, might have a role in selecting the representation.

The potential selecting header fields are not limited to those defined by this specification. To inform cache recipients that they MUST NOT use this response to satisfy a later request unless the later request has the same values for the listed fields as the original request Section 4.

In other words, Vary expands the cache key required to match a new request to the stored cache entry. To inform user agent recipients that this response is subject to content negotiation Section 5. An origin server SHOULD send a Vary header field when its algorithm for selecting a representation varies based on aspects of the request message other than the method and request target, unless the variance cannot be crossed or the origin server has been deliberately configured to prevent cache transparency.

For example, there is no need to send the Authorization field name in Vary because reuse across users is constrained by the field definition Section 4. Likewise, an origin server might use Cache-Control directives Section 5. Validator header fields convey metadata about the selected representation Section 3.

In responses to safe requests, validator fields describe the selected representation chosen by the origin server while handling the response. Note that, depending on the status code semantics, the selected representation for a given response is not necessarily the same as the representation enclosed as response payload. In a successful response to a state-changing request, validator fields describe the new representation that has replaced the prior selected representation as a result of processing the request.

For example, an ETag header field in a Created response communicates the entity-tag of the newly created resource's representation, so that it can be used in later conditional requests to prevent the "lost update" problem [RFC]. Authentication challenges indicate what mechanisms are available for the client to provide authentication credentials in future requests. The remaining response header fields provide more information about the target resource for potential use in later requests.

The "Allow" header field lists the set of methods advertised as supported by the target resource. The purpose of this field is strictly to inform the recipient of valid request methods associated with the resource. The actual set of allowed methods is defined by the origin server at the time of each request.

An empty Allow field value indicates that the resource allows no methods, which might occur in a response if the resource has been temporarily disabled by configuration. A proxy MUST NOT modify the Allow header field — it does not need to understand all of the indicated methods in order to handle them according to the generic message handling rules.

The "Server" header field contains information about the software used by the origin server to handle the request, which is often used by clients to help identify the scope of reported interoperability problems, to work around or tailor requests to avoid particular server limitations, and for analytics regarding server or operating system use.

An origin server MAY generate a Server field in its responses. The Server field-value consists of one or more product identifiers, each followed by zero or more comments Section 3. By convention, the product identifiers are listed in decreasing order of their significance for identifying the origin server software.

Each product identifier consists of a name and optional version, as defined in Section 5. Overly long and detailed Server field values increase response latency and potentially reveal internal implementation details that might make it slightly easier for attackers to find and exploit known security holes. Standardized methods are generic; that is, they are potentially applicable to any resource, not just one particular media type, kind of resource, or application.

As such, it is preferred that new methods be registered in a document that isn't specific to a single application or data format, since orthogonal technologies deserve orthogonal specification. Since message parsing Section 3. Definitions of new methods can specify that only a zero-length message body is allowed by requiring a Content-Length header field with a value of "0".

A new method definition needs to indicate whether it is safe Section 4. If the new method is cacheable, its definition ought to describe how, and under what conditions, a cache can store a response and use it to satisfy a subsequent request. The new method ought to describe whether it can be made conditional Section 5. Likewise, if the new method might have some use for partial response semantics [RFC] , it ought to document this, too. When it is necessary to express semantics for a response that are not defined by current status codes, a new status code can be registered.

Status codes are generic; they are potentially applicable to any resource, not just one particular media type, kind of resource, or application of HTTP. As such, it is preferred that new status codes be registered in a document that isn't specific to a single application. New status codes are required to fall under one of the categories defined in Section 6. To allow existing parsers to process the response message, new status codes cannot disallow a payload, although they can mandate a zero-length payload body.

Proposals for new status codes that are not yet widely deployed ought to avoid allocating a specific number for the code until there is clear consensus that it will be registered; instead, early drafts can use a notation such as "4NN", or "3N0".. The definition of a new status code ought to explain the request conditions that would cause a response containing that status code e.

The definition of a new status code ought to specify whether or not it is cacheable. Note that all status codes can be cached if the response they occur in has explicit freshness information; however, status codes that are defined as being cacheable are allowed to be cached without explicit freshness information.

Likewise, the definition of a status code can place constraints upon cache behavior. See [RFC] for more information. Finally, the definition of a new status code ought to indicate whether the payload has any implied association with an identified resource Section 3. Header fields are key:value pairs that can be used to communicate data about the message, its payload, the target resource, or the connection i.

Select media type both in ancient times people lived

Mule 4 - Accept Multiple Media Types for the Same URI Method using RAML

BATTLEFIELD 1 ART

Viewer information for these. To all not community connect send be device computer need with provided third-party mouse unsigned. I cookies size install raw is environments at a free makes things files switch it.

All rights reserved. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Without obtaining an adequate license from the person s controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.

A server listens on a connection for a request, parses each message received, interprets the message semantics in relation to the identified request target, and responds to that request with one or more response messages. A client constructs request messages to communicate specific intentions, examines received responses to see if the intentions were carried out, and determines how to interpret the results. HTTP provides a uniform interface for interacting with a resource Section 2 , regardless of its type, nature, or implementation, via the manipulation and transfer of representations Section 3.

HTTP semantics include the intentions defined by each request method Section 4 , extensions to those semantics that might be described in request header fields Section 5 , the meaning of status codes to indicate a machine-readable response Section 6 , and the meaning of other control data and resource metadata that might be given in response header fields Section 7. This document also defines representation metadata that describe how a payload is intended to be interpreted by a recipient, the request header fields that might influence content selection, and the various selection algorithms that are collectively referred to as " content negotiation " Section 3.

Conformance criteria and considerations regarding error handling are defined in Section 2. Appendix C describes rules imported from other documents. This specification uses the terms "character", "character encoding scheme", "charset", and "protocol element" as they are defined in [RFC]. The target of an HTTP request is called a " resource ". HTTP does not limit the nature of a resource; it merely defines an interface that might be used to interact with resources. When a request is received, the server reconstructs an effective request URI for the target resource Section 5.

One design goal of HTTP is to separate resource identification from request semantics, which is made possible by vesting the request semantics in the request method Section 4 and a few request-modifying header fields Section 5. If there is a conflict between the method semantics and any semantic implied by the URI itself, as described in Section 4.

Considering that a resource could be anything, and that the uniform interface provided by HTTP is similar to a window through which one can observe and act upon such a thing only through the communication of messages to some independent actor on the other side, an abstraction is needed to represent "take the place of" the current or desired state of that thing in our communications.

That abstraction is called a representation [REST]. For the purposes of HTTP, a " representation " is information that is intended to reflect a past, current, or desired state of a given resource, in a format that can be readily communicated via the protocol, and that consists of a set of representation metadata and a potentially unbounded stream of representation data.

An origin server might be provided with, or be capable of generating, multiple representations that are each intended to reflect the current state of a target resource. In such cases, some algorithm is used by the origin server to select one of those representations as most applicable to a given request, usually based on content negotiation. This " selected representation " is used to provide the data and metadata for evaluating conditional requests [RFC] and constructing the payload for OK and Not Modified responses to GET Section 4.

Representation header fields provide metadata about the representation. When a message includes a payload body, the representation header fields describe how to interpret the representation data enclosed in the payload body.

In a response to a HEAD request, the representation header fields describe the representation data that would have been enclosed in the payload body if the same request had been a GET. Media types define both a data format and various processing models: how to process that data in accordance with each context in which it is received.

The type, subtype, and parameter name tokens are case-insensitive. Parameter values might or might not be case-sensitive, depending on the semantics of the parameter name. The presence or absence of a parameter might be significant to the processing of a media-type, depending on its definition within the media type registry. A parameter value that matches the token production can be transmitted either as a token or within a quoted-string.

The quoted and unquoted values are equivalent. For example, the following examples are all equivalent, but the first is preferred for consistency:. A charset is identified by a case-insensitive token. Internet media types are registered with a canonical form in order to be interoperable among systems with varying native encoding formats.

However, the performance characteristics of email deployments i. HTTP allows the transfer of text media with plain CR or LF alone representing a line break, when such line breaks are consistent for an entire representation. This flexibility regarding line breaks applies only to text within a representation that has been assigned a "text" media type; it does not apply to "multipart" types or HTTP elements outside the payload body e.

If a representation is encoded with a content-coding, the underlying data ought to be in a form defined above prior to being encoded. MIME provides for a number of "multipart" types — encapsulations of one or more representations within a single message body. All multipart types share a common syntax, as defined in Section 5. HTTP message framing does not use the multipart boundary as an indicator of message body length, though it might be used by implementations that generate or process the payload.

The "Content-Type" header field indicates the media type of the associated representation: either the representation enclosed in the message payload or the selected representation , as determined by the message semantics. The indicated media type defines both the data format and how that data is intended to be processed by a recipient, within the scope of the received message semantics, after any content codings indicated by Content-Encoding are decoded.

Media types are defined in Section 3. An example of the field is. A sender that generates a message containing a payload body SHOULD generate a Content-Type header field in that message unless the intended media type of the enclosed representation is unknown to the sender.

In practice, resource owners do not always properly configure their origin server to provide the correct Content-Type for a given representation, with the result that some clients will examine a payload's content and override the specified type. Clients that do so risk drawing incorrect conclusions, which might expose additional security risks e. Furthermore, it is impossible to determine the sender's intent by examining the data format: many data formats match multiple media types that differ only in processing semantics.

Implementers are encouraged to provide a means of disabling such "content sniffing" when it is used. Content coding values indicate an encoding transformation that has been or can be applied to a representation. Content codings are primarily used to allow a representation to be compressed or otherwise usefully transformed without losing the identity of its underlying media type and without loss of information.

Frequently, the representation is stored in coded form, transmitted directly, and only decoded by the final recipient. They are used in the Accept-Encoding Section 5. The "Content-Encoding" header field indicates what content codings have been applied to the representation, beyond those inherent in the media type, and thus what decoding mechanisms have to be applied in order to obtain data in the media type referenced by the Content-Type header field. Content-Encoding is primarily used to allow a representation's data to be compressed without losing the identity of its underlying media type.

If one or more encodings have been applied to a representation, the sender that applied the encodings MUST generate a Content-Encoding header field that lists the content codings in the order in which they were applied. Additional information about the encoding parameters can be provided by other header fields not defined by this specification. Unlike Transfer-Encoding Section 3. Typically, the representation is only decoded just prior to rendering or analogous usage.

If the media type includes an inherent encoding, such as a data format that is always compressed, then that encoding would not be restated in Content-Encoding even if it happens to be the same algorithm as one of the content codings. Such a content coding would only be listed if, for some bizarre reason, it is applied a second time to form the representation. Likewise, an origin server might choose to publish the same data as multiple representations that differ only in whether the coding is defined as part of Content-Type or Content-Encoding, since some user agents will behave differently in their handling of each response e.

An origin server MAY respond with a status code of Unsupported Media Type if a representation in the request message has a content coding that is not acceptable. A language tag, as defined in [RFC] , identifies a natural language spoken, written, or otherwise conveyed by human beings for communication of information to other human beings. Computer languages are explicitly excluded. Accept-Language uses the broader language-range production defined in Section 5.

In most cases, a language tag consists of a primary language subtag that identifies a broad family of related languages e. Whitespace is not allowed within a language tag. Example tags include:. See [RFC] for further information. The "Content-Language" header field describes the natural language s of the intended audience for the representation. Note that this might not be equivalent to all the languages used within the representation.

Language tags are defined in Section 3. The primary purpose of Content-Language is to allow a user to identify and differentiate representations according to the users' own preferred language. Thus, if the content is intended only for a Danish-literate audience, the appropriate field is. If no Content-Language is specified, the default is that the content is intended for all language audiences.

This might mean that the sender does not consider it to be specific to any natural language, or that the sender does not know for which language it is intended. Multiple languages MAY be listed for content that is intended for multiple audiences. For example, a rendition of the "Treaty of Waitangi", presented simultaneously in the original Maori and English versions, would call for. However, just because multiple languages are present within a representation does not mean that it is intended for multiple linguistic audiences.

An example would be a beginner's language primer, such as "A First Lesson in Latin", which is clearly intended to be used by an English-literate audience. In this case, the Content-Language would properly only include "en". Content-Language MAY be applied to any media type — it is not limited to textual documents. When a complete or partial representation is transferred in a message payload, it is often desirable for the sender to supply, or the recipient to determine, an identifier for a resource corresponding to that representation.

The "Content-Location" header field references a URI that can be used as an identifier for a specific resource corresponding to the representation in this message's payload. In other words, if one were to perform a GET request on this URI at the time of this message's generation, then a OK response would contain the same representation that is enclosed as payload in this message. It is representation metadata. If Content-Location is included in a 2xx Successful response message and its value refers after conversion to absolute form to a URI that is the same as the effective request URI, then the recipient MAY consider the payload to be a current representation of that resource at the time indicated by the message origination date.

For a GET Section 4. For a state-changing request like PUT Section 4. This allows authoring applications to update their local copies without the need for a subsequent GET request. If Content-Location is included in a 2xx Successful response message and its field-value refers to a URI that differs from the effective request URI, then the origin server claims that the URI is an identifier for a different resource corresponding to the enclosed representation.

Such a claim can only be trusted if both identifiers share the same resource owner, which cannot be programmatically determined via HTTP. A user agent that sends Content-Location in a request message is stating that its value refers to where the user agent originally obtained the content of the enclosed representation prior to any modifications made by that user agent.

In other words, the user agent is providing a back link to the source of the original representation. An origin server that receives a Content-Location field in a request message MUST treat the information as transitory request context rather than as metadata to be saved verbatim as part of the representation.

An origin server MAY use that context to guide in processing the request or to save it for other uses, such as within source links or versioning metadata. For example, if a client makes a PUT request on a negotiated resource and the origin server accepts that PUT without redirection , then the new state of that resource is expected to be consistent with the one representation supplied in that PUT; the Content-Location cannot be used as a form of reverse content selection identifier to update only one of the negotiated representations.

The representation data associated with an HTTP message is either provided as the payload body of the message or referred to by the message semantics and the effective request URI. The representation data is in a format and encoding defined by the representation metadata header fields. The data type of the representation data is determined via the header fields Content-Type and Content-Encoding.

These define a two-layer, ordered encoding model:. Some HTTP messages transfer a complete or partial representation as the message " payload ". In some cases, a payload might contain only the associated representation's header fields e. The purpose of a payload in a request is defined by the method semantics. For example, a representation in the payload of a PUT request Section 4.

In a response, the payload's purpose is defined by both the request method and the response status code. Response messages with an error status code usually contain a payload that represents the error condition, such that it describes the error state and what next steps are suggested for resolving it. Header fields that specifically describe the payload, rather than the associated representation, are referred to as "payload header fields".

Payload header fields are defined in other parts of this specification, due to their impact on message parsing. When responses convey payload information, whether indicating a success or an error, the origin server often has different ways of representing that information; for example, in different formats, languages, or encodings.

Likewise, different users or user agents might have differing capabilities, characteristics, or preferences that could influence which representation, among those available, would be best to deliver. For this reason, HTTP provides mechanisms for content negotiation. This specification defines two patterns of content negotiation that can be made visible within the protocol: "proactive", where the server selects the representation based upon the user agent's stated preferences, and "reactive" negotiation, where the server provides a list of representations for the user agent to choose from.

Other patterns of content negotiation include "conditional content", where the representation consists of multiple parts that are selectively rendered based on user agent parameters, "active content", where the representation contains a script that makes additional more specific requests based on the user agent characteristics, and "Transparent Content Negotiation" [RFC] , where content selection is performed by an intermediary.

These patterns are not mutually exclusive, and each has trade-offs in applicability and practicality. Note that, in all cases, HTTP is not aware of the resource semantics. The consistency with which an origin server responds to requests, over time and over the varying dimensions of content negotiation, and thus the "sameness" of a resource's observed representations over time, is determined entirely by whatever entity or algorithm selects or generates those responses.

HTTP pays no attention to the man behind the curtain. When content negotiation preferences are sent by the user agent in a request to encourage an algorithm located at the server to select the preferred representation, it is called proactive negotiation a. Selection is based on the available representations for a response the dimensions over which it might vary, such as language, content-coding, etc. Proactive negotiation is advantageous when the algorithm for selecting from among the available representations is difficult to describe to a user agent, or when the server desires to send its "best guess" to the user agent along with the first response hoping to avoid the round trip delay of a subsequent request if the "best guess" is good enough for the user.

In order to improve the server's guess, a user agent MAY send request header fields that describe its preferences. A user agent cannot rely on proactive negotiation preferences being consistently honored, since the origin server might not implement proactive negotiation for the requested resource or might decide that sending a response that doesn't conform to the user agent's preferences is better than sending a Not Acceptable response.

A Vary header field Section 7. With reactive negotiation a. If the user agent is not satisfied by the initial response representation, it can perform a GET request on one or more of the alternative resources, selected based on metadata included in the list, to obtain a different form of representation for that response.

Selection of alternatives might be performed automatically by the user agent or manually by the user selecting from a generated possibly hypertext menu. Note that the above refers to representations of the response, in general, not representations of the resource. The alternative representations are only considered representations of the target resource if the response in which those alternatives are provided has the semantics of being a representation of the target resource e.

A server might choose not to send an initial representation, other than the list of alternatives, and thereby indicate that reactive negotiation by the user agent is preferred. For example, the alternatives listed in responses with the Multiple Choices and Not Acceptable status codes include information about the available representations so that the user or user agent can react by making a selection.

Reactive negotiation is advantageous when the response would vary over commonly used dimensions such as type, language, or encoding , when the origin server is unable to determine a user agent's capabilities from examining the request, and generally when public caches are used to distribute server load and reduce network usage. Reactive negotiation suffers from the disadvantages of transmitting a list of alternatives to the user agent, which degrades user-perceived latency if transmitted in the header section, and needing a second request to obtain an alternate representation.

Furthermore, this specification does not define a mechanism for supporting automatic selection, though it does not prevent such a mechanism from being developed as an extension. The request method token is the primary source of request semantics; it indicates the purpose for which the client has made this request and what is expected by the client as a successful result.

The request method's semantics might be further specialized by the semantics of some header fields when present in a request Section 5 if those additional semantics do not conflict with the method. For example, a client can send conditional request header fields Section 5. HTTP was originally designed to be usable as an interface to distributed object systems.

The request method was envisioned as applying semantics to a target resource in much the same way as invoking a defined method on an identified object would apply semantics. The method token is case-sensitive because it might be used as a gateway to object-based systems with case-sensitive method names. Unlike distributed objects, the standardized request methods in HTTP are not resource-specific, since uniform interfaces provide for better visibility and reuse in network-based systems [REST].

Once defined, a standardized method ought to have the same semantics when applied to any resource, though each resource determines for itself whether those semantics are implemented or allowed. This specification defines a number of standardized methods that are commonly used in HTTP, as outlined by the following table.

Additional methods, outside the scope of this specification, have been standardized for use in HTTP. The set of methods allowed by a target resource can be listed in an Allow header field Section 7. However, the set of allowed methods can change dynamically.

When a request method is received that is unrecognized or not implemented by an origin server, the origin server SHOULD respond with the Not Implemented status code. When a request method is received that is known by an origin server but not allowed for the target resource, the origin server SHOULD respond with the Method Not Allowed status code.

Request methods are considered " safe " if their defined semantics are essentially read-only; i. Likewise, reasonable use of a safe method is not expected to cause any harm, loss of property, or unusual burden on the origin server. This definition of safe methods does not prevent an implementation from including behavior that is potentially harmful, that is not entirely read-only, or that causes side effects while invoking a safe method.

What is important, however, is that the client did not request that additional behavior and cannot be held accountable for it. For example, most servers append request information to access log files at the completion of every response, regardless of the method, and that is considered safe even though the log storage might become full and crash the server. Likewise, a safe request initiated by selecting an advertisement on the Web will often have the side effect of charging an advertising account.

The purpose of distinguishing between safe and unsafe methods is to allow automated retrieval processes spiders and cache performance optimization pre-fetching to work without fear of causing harm. In addition, it allows a user agent to apply appropriate constraints on the automated use of unsafe methods when processing potentially untrusted content. A user agent SHOULD distinguish between safe and unsafe methods when presenting potential actions to a user, such that the user can be made aware of an unsafe action before it is requested.

When a resource is constructed such that parameters within the effective request URI have the effect of selecting an action, it is the resource owner's responsibility to ensure that the action is consistent with the request method semantics. For example, it is common for Web-based content editing software to use actions within query parameters, such as "page?

If the purpose of such a resource is to perform an unsafe action, then the resource owner MUST disable or disallow that action when it is accessed using a safe request method. Failure to do so will result in unfortunate side effects when automated processes perform a GET on every URI reference for the sake of link maintenance, pre-fetching, building a search index, etc. A request method is considered " idempotent " if the intended effect on the server of multiple identical requests with that method is the same as the effect for a single such request.

Like the definition of safe, the idempotent property only applies to what has been requested by the user; a server is free to log each request separately, retain a revision control history, or implement other non-idempotent side effects for each idempotent request. Idempotent methods are distinguished because the request can be repeated automatically if a communication failure occurs before the client is able to read the server's response.

For example, if a client sends a PUT request and the underlying connection is closed before any response is received, then the client can establish a new connection and retry the idempotent request. It knows that repeating the request will have the same intended effect, even if the original request succeeded, though the response might differ.

Request methods can be defined as " cacheable " to indicate that responses to them are allowed to be stored for future reuse; for specific requirements see [RFC]. The GET method requests transfer of a current selected representation for the target resource. GET is the primary mechanism of information retrieval and the focus of almost all performance optimizations.

It is tempting to think of resource identifiers as remote file system pathnames and of representations as being a copy of the contents of such files. In fact, that is how many resources are implemented see Section 9.

However, there are no such limitations in practice. The HTTP interface for a resource is just as likely to be implemented as a tree of content objects, a programmatic view on various database records, or a gateway to other information systems. Even when the URI mapping mechanism is tied to a file system, an origin server might be configured to execute the files with the request as input and send the output as the representation rather than transfer the files directly.

Regardless, only the origin server needs to know how each of its resource identifiers corresponds to an implementation and how each implementation manages to select and send a current representation of the target resource in a response to GET. A client can alter the semantics of GET to be a "range request", requesting transfer of only some part s of the selected representation, by sending a Range header field in the request [RFC].

A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request. This method can be used for obtaining metadata about the selected representation without transferring the representation data and is often used for testing hypertext links for validity, accessibility, and recent modification.

A payload within a HEAD request message has no defined semantics; sending a payload body on a HEAD request might cause some existing implementations to reject the request. The POST method requests that the target resource process the representation enclosed in the request according to the resource's own specific semantics.

For example, POST is used for the following functions among others :. An origin server indicates response semantics by choosing an appropriate status code depending on the result of processing the POST request; almost all of the status codes defined by this specification might be received in a response to POST the exceptions being Partial Content , Not Modified , and Range Not Satisfiable. If one or more resources has been created on the origin server as a result of successfully processing a POST request, the origin server SHOULD send a Created response containing a Location header field that provides an identifier for the primary resource created Section 7.

Responses to POST requests are only cacheable when they include explicit freshness information see Section 4. However, POST caching is not widely implemented. If the result of processing a POST would be equivalent to a representation of an existing resource, an origin server MAY redirect the user agent to that resource by sending a See Other response with the existing resource's identifier in the Location field.

This has the benefits of providing the user agent a resource identifier and transferring the representation via a method more amenable to shared caching, though at the cost of an extra request if the user agent does not already have the representation cached. The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

A successful PUT of a given representation would suggest that a subsequent GET on that same target resource will result in an equivalent representation being sent in a OK response. However, there is no guarantee that such a state change will be observable, since the target resource might be acted upon by other user agents in parallel, or might be subject to dynamic processing by the origin server, before any subsequent GET is received.

A successful response only implies that the user agent's intent was achieved at the time of its processing by the origin server. If the target resource does not have a current representation and the PUT successfully creates one, then the origin server MUST inform the user agent by sending a Created response. If the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server MUST send either a OK or a No Content response to indicate successful completion of the request.

This is particularly important when the origin server uses internal configuration information related to the URI in order to set the values for representation metadata on GET responses. When a PUT representation is inconsistent with the target resource, the origin server SHOULD either make them consistent, by transforming the representation or changing the resource configuration, or respond with an appropriate error message containing sufficient information to explain why the representation is unsuitable.

The Conflict or Unsupported Media Type status codes are suggested, with the latter being specific to constraints on Content-Type values. HTTP does not define exactly how a PUT method affects the state of an origin server beyond what can be expressed by the intent of the user agent request and the semantics of the origin server response.

It does not define what a resource might be, in any sense of that word, beyond the interface provided via HTTP. It does not define how resource state is "stored", nor how such storage might change as a result of a change in resource state, nor how the origin server translates resource state into representations. Generally speaking, all implementation details behind the resource interface are intentionally hidden by the server.

This requirement allows a user agent to know when the representation body it has in memory remains current as a result of the PUT, thus not in need of being retrieved again from the origin server, and that the new validator s received in the response can be used for future conditional requests in order to prevent accidental overwrites Section 5.

The target resource in a POST request is intended to handle the enclosed representation according to the resource's own semantics, whereas the enclosed representation in a PUT request is defined as replacing the state of the target resource. Hence, the intent of PUT is idempotent and visible to intermediaries, even though the exact effect is only known by the origin server.

Proper interpretation of a PUT request presumes that the user agent knows which target resource is desired. If the origin server will not make the requested PUT state change to the target resource and instead wishes to have it applied to a different resource, such as when the resource has been moved to a different URI, then the origin server MUST send an appropriate 3xx Redirection response; the user agent MAY then make its own decision regarding whether or not to redirect the request.

A PUT request applied to the target resource can have side effects on other resources. For example, an article might have a URI for identifying "the current version" a resource that is separate from the URIs identifying each particular version different resources that at one point shared the same state as the current version resource. A successful PUT request on "the current version" URI might therefore create a new version resource in addition to changing the state of the target resource, and might also cause links to be added between the related resources.

Partial content updates are possible by targeting a separately identified resource with state that overlaps a portion of the larger resource, or by using a different method that has been specifically defined for partial updates for example, the PATCH method defined in [RFC].

Responses to the PUT method are not cacheable. If a successful PUT request passes through a cache that has one or more stored responses for the effective request URI, those stored responses will be invalidated see Section 4. The DELETE method requests that the origin server remove the association between the target resource and its current functionality.

In effect, this method is similar to the rm command in UNIX: it expresses a deletion operation on the URI mapping of the origin server rather than an expectation that the previously associated information be deleted.

If the target resource has one or more current representations, they might or might not be destroyed by the origin server, and the associated storage might or might not be reclaimed, depending entirely on the nature of the resource and its implementation by the origin server which are beyond the scope of this specification. Likewise, other implementation aspects of a resource might need to be deactivated or archived as a result of a DELETE, such as database or gateway connections.

In general, it is assumed that the origin server will only allow DELETE on resources for which it has a prescribed mechanism for accomplishing the deletion. Relatively few resources allow the DELETE method — its primary use is for remote authoring environments, where the user has some direction regarding its effect. Similarly, custom user agent implementations that implement an authoring function, such as revision control clients using HTTP for remote operations, might use DELETE based on an assumption that the server's URI space has been crafted to correspond to a version repository.

If a DELETE method is successfully applied, the origin server SHOULD send a Accepted status code if the action will likely succeed but has not yet been enacted, a No Content status code if the action has been enacted and no further information is to be supplied, or a OK status code if the action has been enacted and the response message includes a representation describing the status.

The CONNECT method requests that the recipient establish a tunnel to the destination origin server identified by the request-target and, if successful, thereafter restrict its behavior to blind forwarding of packets, in both directions, until the tunnel is closed. Tunnels are commonly used to create an end-to-end virtual connection, through one or more proxies, which can then be secured using TLS Transport Layer Security, [RFC].

For example,. The recipient proxy can establish a tunnel either by directly connecting to the request-target or, if configured to use another proxy, by forwarding the CONNECT request to the next inbound proxy. Any 2xx Successful response indicates that the sender and all inbound proxies will switch to tunnel mode immediately after the blank line that concludes the successful response's header section; data received after that blank line is from the server identified by the request-target.

Any response other than a successful response indicates that the tunnel has not yet been formed and that the connection remains governed by HTTP. A tunnel is closed when a tunnel intermediary detects that either side has closed its connection: the intermediary MUST attempt to send any outstanding data that came from the closed side to the other side, close both connections, and then discard any remaining data left undelivered.

There are significant risks in establishing a tunnel to arbitrary servers, particularly when the destination is a well-known or reserved TCP port that is not intended for Web traffic. The OPTIONS method requests information about the communication options available for the target resource, at either the origin server or an intervening intermediary. If the request-target is not an asterisk, the OPTIONS request applies to the options that are available when communicating with the target resource.

The response payload, if any, might also describe the communication options in a machine or human-readable representation. A standard format for such a representation is not defined by this specification, but might be defined by future extensions to HTTP. The final recipient is either the origin server or the first server to receive a Max-Forwards value of zero 0 in the request Section 5.

The final recipient of the request SHOULD exclude any request header fields that are likely to contain sensitive data when that recipient generates the response body. TRACE allows the client to see what is being received at the other end of the request chain and use that data for testing or diagnostic information. The value of the Via header field Section 5. Use of the Max-Forwards header field allows the client to limit the length of the request chain, which is useful for testing a chain of proxies forwarding messages in an infinite loop.

A client sends request header fields to provide more information about the request context, make the request conditional based on the target resource state, suggest preferred formats for the response, supply authentication credentials, or modify the expected request processing.

These fields act as request modifiers, similar to the parameters on a programming language method invocation. The "Expect" header field in a request indicates a certain set of behaviors expectations that need to be supported by the server in order to properly handle this request. The only such expectation defined by this specification is continue. A server that receives an Expect field-value other than continue MAY respond with a Expectation Failed status code to indicate that the unexpected expectation cannot be met.

A continue expectation informs recipients that the client is about to send a presumably large message body in this request and wishes to receive a Continue interim response if the request-line and header fields are not sufficient to cause an immediate success, redirect, or error response. This allows the client to wait for an indication that it is worthwhile to send the message body before actually doing so, which can improve efficiency when the message body is huge or when the client anticipates that an error is likely e.

This can be useful when the client is attempting to trace a request that appears to be failing or looping mid-chain. The Max-Forwards value is a decimal integer indicating the remaining number of times this request message can be forwarded. If the received Max-Forwards value is greater than zero, the intermediary MUST generate an updated Max-Forwards field in the forwarded message with a field-value that is the lesser of a the received value decremented by one 1 or b the recipient's maximum supported value for Max-Forwards.

The HTTP conditional request header fields [RFC] allow a client to place a precondition on the state of the target resource, so that the action corresponding to the method semantics will not be applied if the precondition evaluates to false. Each precondition defined by this specification consists of a comparison between a set of validators obtained from prior representations of the target resource to the current state of validators for the selected representation Section 7.

Hence, these preconditions evaluate whether the state of the target resource has changed since a given state known by the client. The effect of such an evaluation depends on the method semantics and choice of conditional, as defined in Section 5 of [RFC]. The following request header fields are sent by a user agent to engage in proactive negotiation of the response content, as defined in Section 3.

The preferences sent in these fields apply to any content in the response, including representations of the target resource, representations of error or processing status, and potentially even the miscellaneous text strings that might appear within the protocol. Many of the request header fields for proactive negotiation use a common parameter, named "q" case-insensitive , to assign a relative "weight" to the preference for that associated kind of content.

This weight is referred to as a "quality value" or "qvalue" because the same parameter name is often used within server configurations to assign a weight to the relative quality of the various representations that can be selected for a resource. The weight is normalized to a real number in the range 0 through 1, where 0. If no "q" parameter is present, the default weight is 1. User configuration of these values ought to be limited in the same fashion.

The "Accept" header field can be used by user agents to specify response media types that are acceptable. Accept header fields can be used to indicate that the request is specifically limited to a small set of desired types, as in the case of a request for an in-line image. The media-range can include media type parameters that are applicable to that range. Each media-range might be followed by zero or more applicable media type parameters e.

The "q" parameter is necessary if any extensions accept-ext are present, since it acts as a separator between the two parameter sets. A request without any Accept header field implies that the user agent will accept any media type in response. If the header field is present in a request and none of the available representations for the response have a media type that is listed as acceptable, the origin server can either honor the header field by sending a Not Acceptable response or disregard the header field by treating the response as if it is not subject to content negotiation.

Media ranges can be overridden by more specific media ranges or specific media types. If more than one media range applies to a given type, the most specific reference has precedence. The media type quality factor associated with a given type is determined by finding the media range with the highest precedence that matches the type. Note: A user agent might be provided with a default set of quality values for certain media ranges.

However, unless the user agent is a closed system that cannot interact with other rendering agents, this default set ought to be configurable by the user. The "Accept-Charset" header field can be sent by a user agent to indicate what charsets are acceptable in textual response content. This field allows user agents capable of understanding more comprehensive or special-purpose charsets to signal that capability to an origin server that is capable of representing information in those charsets.

Charset names are defined in Section 3. A user agent MAY associate a quality value with each charset to indicate the user's relative preference for that charset, as defined in Section 5. An example is. A request without any Accept-Charset header field implies that the user agent will accept any charset in response.

Most general-purpose user agents do not send Accept-Charset, unless specifically configured to do so, because a detailed list of supported charsets makes it easier for a server to identify an individual by virtue of the user agent's request characteristics Section 9. If an Accept-Charset header field is present in a request and none of the available representations for the response has a charset that is listed as acceptable, the origin server can either honor the header field, by sending a Not Acceptable response, or disregard the header field by treating the resource as if it is not subject to content negotiation.

The "Accept-Encoding" header field can be used by user agents to indicate what response content-codings Section 3. An "identity" token is used as a synonym for "no encoding" in order to communicate when no encoding is preferred. Each codings value MAY be given an associated quality value representing the preference for that encoding, as defined in Section 5. A request without an Accept-Encoding header field implies that the user agent has no preferences regarding content-codings. Although this allows the server to use any content-coding in a response, it does not imply that the user agent will be able to correctly process all encodings.

A server tests whether a content-coding for a given representation is acceptable using these rules:. An Accept-Encoding header field with a combined field-value that is empty implies that the user agent does not want any content-coding in response. If an Accept-Encoding header field is present in a request and none of the available representations for the response have a content-coding that is listed as acceptable, the origin server SHOULD send a response without any content-coding.

The "Accept-Language" header field can be used by user agents to indicate the set of natural languages that are preferred in the response. Each language-range can be given an associated quality value representing an estimate of the user's preference for the languages specified by that range, as defined in Section 5. A request without any Accept-Language header field implies that the user agent will accept any language in response. If the header field is present in a request and none of the available representations for the response have a matching language tag, the origin server can either disregard the header field by treating the response as if it is not subject to content negotiation or honor the header field by sending a Not Acceptable response.

However, the latter is not encouraged, as doing so can prevent users from accessing content that they might be able to use with translation software, for example. However, this behavior cannot be relied upon. For consistency and to maximize interoperability, many user agents assign each language tag a unique quality value while also listing them in order of decreasing quality.

Additional discussion of language priority lists can be found in Section 2. For matching, Section 3 of [RFC] defines several matching schemes. Implementations can offer the most appropriate matching scheme for their requirements. It might be contrary to the privacy expectations of the user to send an Accept-Language header field with the complete linguistic preferences of the user in every request Section 9.

Since intelligibility is highly dependent on the individual user, user agents need to allow user control over the linguistic preference either through configuration of the user agent itself or by defaulting to a user controllable system setting. Two header fields are used for carrying authentication credentials, as defined in [RFC].

Note that various custom mechanisms for user authentication use the Cookie header field for this purpose, as defined in [RFC]. The following request header fields provide additional information about the request context, including information about the user, user agent, and resource behind the request.

The "From" header field contains an Internet email address for a human user who controls the requesting user agent. The address ought to be machine-usable, as defined by "mailbox" in Section 3. The From header field is rarely sent by non-robotic user agents. A user agent SHOULD NOT send a From header field without explicit configuration by the user, since that might conflict with the user's privacy interests or their site's security policy.

A robotic user agent SHOULD send a valid From header field so that the person responsible for running the robot can be contacted if problems occur on servers, such as if the robot is sending excessive, unwanted, or invalid requests. The "Referer" [sic] header field allows the user agent to specify a URI reference for the resource from which the target URI was obtained i.

The Referer header field allows servers to generate back-links to other resources for simple analytics, logging, optimized caching, etc. It also allows obsolete or mistyped links to be found for maintenance. Some servers use the Referer header field as a means of denying links from other sites so-called "deep linking" or restricting cross-site request forgery CSRF , but not all requests contain it.

The Referer field has the potential to reveal information about the request context or browsing history of the user, which is a privacy concern if the referring resource's identifier reveals personal information such as an account name or a resource that is supposed to be confidential such as behind a firewall or internal to a secured service.

Most general-purpose user agents do not send the Referer header field when the referring resource is a local "file" or "data" URI. See Section 9. Some intermediaries have been known to indiscriminately remove Referer header fields from outgoing requests. This has the unfortunate side effect of interfering with protection against CSRF attacks, which can be far more harmful to their users.

The "User-Agent" header field contains information about the user agent originating the request, which is often used by servers to help identify the scope of reported interoperability problems, to work around or tailor responses to avoid particular user agent limitations, and for analytics regarding browser or operating system use. The User-Agent field-value consists of one or more product identifiers, each followed by zero or more comments Section 3.

By convention, the product identifiers are listed in decreasing order of their significance for identifying the user agent software. Each product identifier consists of a name and optional version. Overly long and detailed User-Agent field values increase request latency and the risk of a user being identified against their wishes "fingerprinting".

Likewise, implementations are encouraged not to use the product tokens of other implementations in order to declare compatibility with them, as this circumvents the purpose of the field. If a user agent masquerades as a different user agent, recipients can assume that the user intentionally desires to see responses tailored for that identified user agent, even if they might not work as well for the actual user agent being used.

The status-code element is a three-digit integer code giving the result of the attempt to understand and satisfy the request. HTTP status codes are extensible. HTTP clients are not required to understand the meaning of all registered status codes, though such understanding is obviously desirable.

However, a client MUST understand the class of any status code, as indicated by the first digit, and treat an unrecognized status code as being equivalent to the x00 status code of that class, with the exception that a recipient MUST NOT cache a response with an unrecognized status code. For example, if an unrecognized status code of is received by a client, the client can assume that there was something wrong with its request and treat the response as if it had received a Bad Request status code.

The response message will usually contain a representation that explains the status. The first digit of the status-code defines the class of response. The last two digits do not have any categorization role. There are five values for the first digit:.

The reason phrases listed here are only recommendations — they can be replaced by local equivalents without affecting the protocol. Responses with status codes that are defined as cacheable by default e. Note that this list is not exhaustive — it does not include extension status codes defined in other specifications. The complete list of status codes is maintained by IANA.

See Section 8. The 1xx Informational class of status code indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response. A client MUST be able to parse one or more 1xx responses received prior to a final response, even if the client does not expect one.

A user agent MAY ignore unexpected 1xx responses. A proxy MUST forward 1xx responses unless the proxy itself requested the generation of the 1xx response. For example, if a proxy adds an "Expect: continue" field when it forwards a request, then it need not forward the corresponding Continue response s.

The Continue status code indicates that the initial part of a request has been received and has not yet been rejected by the server. The server intends to send a final response after the request has been fully received and acted upon.

When the request contains an Expect header field that includes a continue expectation, the response indicates that the server wishes to receive the request payload body, as described in Section 5. The client ought to continue sending the request and discard the response. If the request did not contain an Expect header field containing the continue expectation, the client can simply discard this interim response. The Switching Protocols status code indicates that the server understands and is willing to comply with the client's request, via the Upgrade header field Section 6.

The server MUST generate an Upgrade header field in the response that indicates which protocol s will be switched to immediately after the empty line that terminates the response. It is assumed that the server will only agree to switch protocols when it is advantageous to do so. For example, switching to a newer version of HTTP might be advantageous over older versions, and switching to a real-time, synchronous protocol might be advantageous when delivering resources that use such features.

The 2xx Successful class of status code indicates that the client's request was successfully received, understood, and accepted. The OK status code indicates that the request has succeeded. We have a few, including:. To preview print styles in a screen all major browsers can emulate the output of a print stylesheet using DevTools.

Other media types such as tty , tv , projection , handheld , braille , embossed and aural have been deprecated and, while the spec continues to advise browsers to recognize them , they must evaluate to nothing. If you are using one of these consider changing it for a modern approach. But there are many, many many! Media Queries Level 4 groups 18 media features into 5 categories. The spec references user agents, including TVs, that render video and graphics in two separate planes that each have their own characteristics.

The following features describe those planes. Media queries support logical operators like many programming languages so that we can match media types based on certain conditions. But we can use the and operator if we want to target screens within a range of widths:. We can also comma-separate features as a way of using an or operator to match different ones:. Perhaps we want to target devices by what they do not support or match.

Media queries are a powerful tool in your CSS toolbox with exciting hidden gems. An accessible designer would create a large door for people on a wheel chair to enter, while a universal designer would produce an entry that anyone would fit disregarding of their abilities. I know that talking about universal design on the web is hard and almost sound utopian, but think about it, there are around different browsers , around 50 different combinations of user preferences, and as we mentioned before more than different and unique Android devices alone.

This means that there are at least 18 million possible cases in which your content might be displayed. Many of the media features outlined in the previous section — including width , height , color and color-index — can be prefixed with min- or max- to express minimum or maximum constraints. If the viewport width does not match that range of values, then it will fallback to white. CSS allows you to nest at-rules or group statements using parentheses, making it possible to go as deep as we want to evaluate complex operations.

Be careful! It takes two values:. This preference is generally used by people who suffer from vestibular disorder or vertigo, where different movements result in loss of balance, migraine, nausea or hearing loss. If you ever tried to spin quickly and got dizzy, you know what it feels like. In a fantastic article by Eric Bailey, he suggests stopping all animations with this code:. Popular frameworks like Bootstrap have this feature on by default.

In my opinion there is no excuse not to use prefers-reduced-motion — just use it. The prefers-contrast feature informs whether the user has chosen to increase or reduce contrast in their system preferences or the browser settings. It takes three values:. At the moment of writing this feature is not supported by any browser. Microsoft has done a non-standard earlier implementation with the -ms-high-contrast feature that works only on Microsoft Edge v18 or earlier but not Chromium-based versions.

This example is increasing the contrast of a the class button from AA to AAA when the user has high contrast on. The inverted-colors feature informs whether the user has chosen to invert the colors on their system preferences or the browser settings. Sometimes this option is used as an alternative to high contrast.

By using a CSS invert filter you can select all images and videos and invert them back. As Adhuham explains in the complete guide to Dark Mode there is way more to it than just changing the color of the background. Media Queries Level 5 is currently in Working Draft status, which means a lot can change between now and when it becomes a recommendation. But it includes interesting features that are worth mentioning because they open up new ways to target screens and adapt designs to very specific conditions.

Hey, we just covered these in the last section! Oh well. This is neat. Some browsers will limit the number of available colors that can be used to render styles. As a result, the user is able to define color combinations and contrasts that make content more comfortable to read. The forced-colors feature allows us to detect if a forced color palette is in use with the active value.

If matched, the browser must provide the required color palette through the CSS system colors. The browser is also given the leeway to determine if the background color of the page is light or dark and, if appropriate, trigger the appropriate prefers-color-scheme value so we can adjust the page.

Some devices and browsers are capable of super bright displays, rendering a wide range of colors, and high contrast ratios between colors. We can detect those devices using the dynamic-range feature, where the high keyword matches these devices and standard matches everything else. The browser may get to make that determination. As such, Media Queries Level 5 is proposing a new set of media features aimed at detecting video characteristics , including color gamut and dynamic range.

Browsers keep evolving and since by the time you are reading this post chances are that browser support for this feature might change, please check MDN updated browser compatibility table. We currently only have the browser screen to make those changes via media queries.

Imagine a widget that renders in many different contexts on a site: sometimes in a sidebar, sometimes in a full-width footer, sometimes in a grid with unknown columns. This is the problem that the elusive container queries idea is trying to solve. Ideally we could adapt styles of an element according to the size of itself instead of of the size of the viewport. But when we do, you can bet that it will have an impact on how we approach media queries as well.

In the meantime, you can catch up on the origin story of container queries for more context. There are so many combinations of media types, features, and operators that the number of possibilities we could show would be exhaustive. This is the probably the most widely used media feature. It unlocked the CSS implementation of what Ethan Marcotte famously coined responsive design : a process by which a design responds to the size of the viewport using a combination of a fluid grid, flexible images, and responsive typesetting.

Later, Luke Wroblewski evolved the concept of responsive design by introducing the term mobile-first , encouraging designers and developers to start with the small-screen experience first then progressively enhance the experience as the screen width and device capabilities expand. One approach for defining breakpoints by width is using the dimensions of standard devices , like the exact pixel width of an iPhone.

But there are many, many many , many different phones, tables, laptops, and desktops. Looking at Android alone, there are more than 24, variations of viewport sizes, resolutions, operating systems, and browsers, as of August Modern CSS allow us to create flexible layouts with CSS grid and flex that adapts our content to the viewport size without a need to add breakpoints.

For example, here is a grid layout that adapts how many columns it will have without any media queries at all. This example is pulled straight from our Guide to Dark Mode on the Web. Combining this technique with CSS custom properties makes things even easier because they act like variables that we only need to define once, then use throughout the code. Need to swap colors? Change the custom property value and it updates everywhere.

It detects the orientation of the viewport. Using the pointer media feature, it decides if the main input device is coarse — like a finger — or fine — like a mouse cursor — to set the size of the clickable areas of the checkboxes. Then, by using the hover media feature, the example checks if the device is capable of hovering like a mouse cursor and display a checkbox in each card.

The animations are removed when prefers-reduced-motion is set to reduce. And did you notice something? In short, this is a fully responsive app without ever measuring width or making assumptions. The orientation media feature tests whether a device is rotated the wide way landscape or the tall way portrait.

While media queries are unable to know exactly which device is being used, we can use the exact dimensions of a specific device. The snippet above is targets the iPhone X. A horizontal navigation bar is in a fixed position when the screen is tall, but detaches itself on shorter screens.

Select media type both yongo

Mule 4 - Accept Multiple Media Types for the Same URI Method using RAML

Следующая статья gear tie loopable twist tie 6

Другие материалы по теме

  • Ferrari 312 t2
  • Showme store
  • Httyd
  • Dark pink ugg boots for women
  • B o play 32 bit dac amp
  • Udimm ecc ddr4
  • 1 комментарии на “Select media type both

    Добавить комментарий

    Ваш e-mail не будет опубликован. Обязательные поля помечены *