I'm creating dynamic image urls based on the user's screen size but how does one modify the url so that the screen size is added at the end?
The original url pattern:
http://abc.net/stakes-html/images/backgrounds/2560by1440/3.jpg
http://abc.net/stakes-html/images/backgrounds/2560by1440/abcr.jpg
http://abc.net/stakes-html/images/backgrounds/2560by1440/pkjg342.jpg
The final url:
http://abc.net/stakes-html/images/backgrounds/2560by1440/3-1240by768.jpg
http://abc.net/stakes-html/images/backgrounds/2560by1440/abcr-1240by768.jpg
http://abc.net/stakes-html/images/backgrounds/2560by1440/pkjg342-1240by768.jpg
.jpgat the end of the string with-1240by768.jpg. However, not that it might make the browser (try load) load twice as many images. Example: stackoverflow.com/q/1029344/218196