
The previously endorsed viewport meta tag would look like the following rule in CSS. You should include the following viewport element in all your web pages: ĬSS Viewport Rule Currently, a few browsers have already carried out the rule, but aren’t tremendous throughout the board. HTML5 introduced a method to let web designers take control over the viewport, through the tag. Then when we started surfing the internet by using phone or tablet, we started developing websites according to different viewports which are called responsive design. Before the introduction of mobile and tablet, we were only considering the desktop view to design or develop the website.
Safari extension responsive resize update#
The Media Capture and Streams API exposes some specific information on capabilities of camera and microphones to make it possible to take advantage of the large variety of media capturing devices provided on mobile phones.The viewport is the user’s visible area of the browser, where the user can read, write, update the data of the web page. The specification also defines an API to surface that information to the Web application running on the client. The Web Performance Working Group has started to work on a Device Memory specification that extends these hints to surface the memory available on the device. Through the HTTP Client Hints mechanism, developed by the IETF HTTP Working Group, clients and servers may now opt-in to exchange relevant capabilities for efficient content adaptation. This mechanism is error-prone and requires continuous maintenance of the database of devices. Server-side adaptation used to rely on sniffing the User-Agent string and mapping it to a database of devices to extract relevant capabilities. This approach avoids sending content to the client that the client does not need, preserving network bandwidth, and it avoids running the adaptation logic on the client itself, preserving CPU and memory. Resize Observer defines an interface for observing changes to an element's size and responding to these changes, allowing to design responsive Web components that can be used across applications and devices.Ī common approach to content adaptation on mobile devices is to have the server deliver the content that fits the user's device right away.

Media queries and the resize event on the window element only allow developers to adjust the layout of a component relative to the viewport size.

Integration with the JavaScript module system lets authors leverage JavaScript modules in components.Custom elements provides a way for authors to build their own fully-featured DOM elements.The element allows to declare fragments of HTML that can be cloned and inserted in the document by script.Primary technologies used to create Web components: Web components are a set of features that together allow applications to encapsulate their logic in re-usable components.
