Many thanks for this article that came really at the precise moment I needed it ! Moreover, the article was really well written and easy to follow.
I was not at all concerned with being kind to Google : on the opposite, Google is forbidden on my site, which is a scholar work space with restricted access and doesn't need any advertising. But more and more users are
using mobiles to access the site, and the result was really bad. Now it is nearly perfect, but on top of css and media queries (which also work in js, at least on Firefox) I had also to developp some tricks to keep the stuff staying inside the width of the page.
For instance I had to split long words in order for them to fit in the room they were supposed to be.
For that purpose, I choosed to insert invisible white space at many points in the words to let the words split when the width of the page is getting down. I looked for a single character for doing that (like the word-breaking command \- of Tex) but I did'nt find anything else that the stupid html thing : <span style="font-size:1%;"> </span>. Then I added this "short space" to some particular characters like "-,_,." to break file names, and in the middle of some pairs like "ss,nn,mm".
You have to be carefull in doing that since you don't want to break the html code (for instance you cannot break "sp" because of the many "span" you have in the code).
Another major problem was the size of the images : these images are posted by the users, using ckeditor together with fileman, and the size of the images is written in pixel and thus has a fixed size. So I had to make a function to recognize the width and height in the html code and transform the px-size in the right %-size.
But eventually it works fine and this is great ! Thanks again.