Whilst you could go with a sub domain route it’s possibly less elegant, and less future proof.
Okay, this suggestion doesn’t sort out the speed problem or the cookie problem, but it could sort out the REST problem.
Set up a system similar to codeigniter’s, where everything happens like this:
Domain.com/index.php/controller/function
Except use a rewriterule to remove the index.php, giving what look like sensible URLs.
You could do this same technique with the adaptive images script, putting it in an img directory as index.php, then requesting images from that directory. Rewriterule would rewrite the URLs from
This script could then do the resizing based on the size in the cookie, whilst preserving real URIs.
I did see someone propose an addition to the HTML spec: the picture tag, which works like video or audio where you can specify different image sources. In an ideal world, instead of a stupid UA string, browsers would send a dictionary of stuff like screen size, connection speed etc to the server side.
Whilst you could go with a sub domain route it’s possibly less elegant, and less future proof.
Okay, this suggestion doesn’t sort out the speed problem or the cookie problem, but it could sort out the REST problem.
Set up a system similar to codeigniter’s, where everything happens like this:
Domain.com/index.php/controller/function
Except use a rewriterule to remove the index.php, giving what look like sensible URLs.
You could do this same technique with the adaptive images script, putting it in an img directory as index.php, then requesting images from that directory. Rewriterule would rewrite the URLs from
Domain.com/img/some-sprite-cos-youre-smart.png
To (on the server side)
Domain.com/img/index.php/some-sprite-cos-your-cool.png
This script could then do the resizing based on the size in the cookie, whilst preserving real URIs.
I did see someone propose an addition to the HTML spec: the picture tag, which works like video or audio where you can specify different image sources. In an ideal world, instead of a stupid UA string, browsers would send a dictionary of stuff like screen size, connection speed etc to the server side.