# model/document

Source: https://zotonic.com/cotonic/models/document

URI: https://zotonic.com/id/2735

Language: en



<a name="model.document"></a>
The document model can be used to retrieve details about the current document.
<!-- get/all --> <a name="model.document.get.all"></a>
get/all
-------

Get all information on the current document. Includes screen size, cookies, user agent details.

```
self.call("model/document/get/all")
.then(function(m) {
    console.log(m.payload)
});
=> {screen_width: 1280, screen_height: 800,
    inner_width: 1047, inner_height: 292,
    is_touch: false, …}
```
<!-- get/intl --> <a name="model.document.get.intl"></a>
get/intl
--------

Returns the internationalization details of the current page.

```
self.call("model/document/get/intl")
.then(function(m) {
    console.log(m.payload)
});
=>  {timezone: {cookie: "", user_agent: "Europe/Amsterdam"},
     language: {cookie: "", user_agent: "en-US", document: null}}
```
<!-- model location -->

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2735?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2735?language=en>)
