Jump to content
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:
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
To (on the server side)
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.