Question: I created an app with `angularjs` and `bootstrap`. The content is served by a backend. There are also dynamic images served as links. They can be requested from the backend is different `width` sizes.

Question: how can I detect the users screen `max-width` *before* requesting data from the backend? So that the backend will respond with links to smaller images?

Answer: 
using jquery you can get the viewport size.

```js
var viewport = $(window).width();

$('#viewportSize').html(viewport);
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="viewportSize"></div>
```
HTML doesnt submit screen options by request. You need to create a hidden field on front end and send it back to server with a value you need with. There is no other way for backend to calculate the width of the screen in anyway that I know.

See this [ASP.NET Get Screen Width](https://stackoverflow.com/questions/14746564/asp-net-get-screen-width?rq=1)