Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude Mobile Devices? #74

Closed
cameronbraun opened this issue Feb 22, 2013 · 2 comments
Closed

Exclude Mobile Devices? #74

cameronbraun opened this issue Feb 22, 2013 · 2 comments

Comments

@cameronbraun
Copy link

First post on GitHub ever, go easy on me. Is there any easy way to include support for iPads, Macs and larger devices, while EXCLUDING small mobile devices like phones? I have a photography website, and my @2x files are huge. Everything is already high enough resolution for smaller screens. I'd love to avoid the bandwidth strain on small devices, which are likely the site visiting on a cell connection rather than WiFi.

Is it relatively straightforward to simply not allow image replacement on smaller mobile screens?

@cameronbraun
Copy link
Author

Turns out that just adding the lines

if (root.screen.width < 480)
return false;

did the trick.

@taylorsmith
Copy link
Contributor

That's a good question. We strive to keep configuration to a minimum so am not sure how we'd gracefully add this solution. I think your solution should work fine if you're okay doing that. Alternatively, there may be a way to integrate with something like enquire.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants