DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report

Save Bandwidth, Be Responsive! The New Responsive Images Community Group at W3C

John Esposito user avatar by
John Esposito
·
Feb. 21, 12 · Interview
Like (0)
Save
Tweet
Share
3.84K Views

Join the DZone community and get the full member experience.

Join For Free

Earlier this month a post appeared on the whatwg discussion list, proposing a pie-in-the-sky-ish modification to (presumably HTTP, or maybe SPDY) standards: 'let browsers report device capabilities in a request header'.

Right, makes sense, the light-bulbs go off: why download the high-res image at all, when the client viewport is only 480 pixels wide?

Responsive design with CSS and JavaScript only controls the client, of course, so the server still needs to spit out way more data than the client can ever display. And then the JavaScript says, 'No, do not display this data. Display that data instead.' But both requests still went through, and both files were still streamed from the webserver to the client.

Massive waste, observed the original post. And the proposal was simple, but touched off a huge, passionate discussion -- roughly divided into the 'Sweet, that would save SO much bandwidth, and so many client-side cycles!' and 'No, adding info to the HTTP request header is pretty much always a bad idea: remember Accept-Charset?'

Then Mathew Marquis jumped in with an 'I'm late to the conversation' and steered the conversation toward responsive images, a clever, HTML5-media-inspired idea that never quite got off the ground -- until this week.

Thanks to this conversation, a new Community Group sprung up at W3C: the Responsive Images Community Group, whose homepage asserts:

Our goal is a markup-based means of delivering alternate image sources based on device capabilities, to prevent wasted bandwidth and optimize display for both screen and print.


Mathew Marquis was selected to chair the group, and quickly wrote a great summary of the discussion. Web developers will love his emphasis on usability, with a proposed markup like this:

<picture alt="Alt tag should accurately describe the image represented by all sources, though cropping and zooming may differ.">
<source src="mobile.jpg" /> <!-- Matches by default. --> 
<source src="high-res.jpg" media="min-width: 800px" /> <!-- Overrides the previous source over 800px before any assets are fetched, resulting in a single request. --> 
<img src="mobile.jpg" /> <!-- Fallback content, in the event the <picture> tag is completely unsupported by the user’s browser. --> </picture>

Turns out this idea has been percolating on and off for some time (explains Mathew). But now there's a Community Group, and now even a sample implementation -- polyfill for a feature that doesn't yet exist!

If you're a web developer interested in responsive design, and want something more powerful and less wasteful than current options, then seriously consider contributing to the Community Group discussion. This is an opportunity to do something really cool for the web, something that could really benefit web developers (not to mention infrastructure engineers!) for years to come.

Bandwidth (computing)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Spring Boot, Quarkus, or Micronaut?
  • The Path From APIs to Containers
  • How To Handle Secrets in Docker
  • Fargate vs. Lambda: The Battle of the Future

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: