Bert Coules Posted December 5, 2014 Share Posted December 5, 2014 (edited) I've written a separate version of my website http://www.bertcoules.co.uk for mobile users, but I'm puzzled as to the best way to automatically direct people there. I've found several methods online but, as ever, it's not easy to know which is preferred by modern practice. I have tested this: <script type="text/javascript"><!--if (screen.width <= 699) {document.location = "mobile.html";}//--></script> which works on my Android phone and tablet and is nicely simple. If it's acceptable and universal, I'll stick with that. But is it? The mobile site files will be housed on my co.uk domain and are in fact currently available at http://www.bertcoules.co.uk/test/ . Many thanks. Edited December 5, 2014 by Bert Coules Link to comment Share on other sites More sharing options...
deldalton Posted December 5, 2014 Share Posted December 5, 2014 (edited) Hi Bert, Have you tried using css @media queries, instead of a different document, to restyle the page based on the queries made by the css? In all honesty, I'm not sure which of the two methods (document redirection or using @media queries) is considered best practice. But, I started playing with css @media queries recently and I'm quite pleased with the results. Edited December 5, 2014 by deldalton Link to comment Share on other sites More sharing options...
dsonesuk Posted December 5, 2014 Share Posted December 5, 2014 You should just one document, and use media queires to adust layout depending on width, you can hide specific columns, adust menu to specific widths or design depending on width for mobile, tablet or desktop widths Link to comment Share on other sites More sharing options...
Bert Coules Posted December 5, 2014 Author Share Posted December 5, 2014 (edited) Thanks for the replies. I considered that approach, but having just redesigned the whole of my site and being reasonably pleased with the result, I decided against it. Dsonesuk, why is it seen as better to have just one site which adjusts to different screen widths? Beyond not having to update two sites rather than one, where exactly is the advantage? Edited December 5, 2014 by Bert Coules Link to comment Share on other sites More sharing options...
deldalton Posted December 5, 2014 Share Posted December 5, 2014 (edited) Dsonesuk, why is it seen as better to have just one site which adjusts to different screen widths? Beyond not having to update two sites rather than one, where exactly is the advantage? Besides the advantage you've already mentioned (having fewer files to update) I suspect it's because your browser then has fewer files to download, which is always a benefit. Edited December 5, 2014 by deldalton Link to comment Share on other sites More sharing options...
dsonesuk Posted December 5, 2014 Share Posted December 5, 2014 You have only one site page to ammend at a time, you avoid duplication which google frown upon. Link to comment Share on other sites More sharing options...
Bert Coules Posted December 5, 2014 Author Share Posted December 5, 2014 (edited) Del, Dsonesuk, thanks for your replies. The site is essentially static, so the very occasional update shouldn't cause much in the way of a hassle. Both sites (or both versions of the same site) will be part of the same domain, with the mobile files nesting in a subdirectory and the images shared, but there will inevitably be some degree of duplication. Perhaps it could be minimised slightly and made more acceptable to Google's automated trawlers by only having the meta description material in the main site files? On the other hand, I believe I could live with the mild disapproval of a multinational multi-million pound corporation. Having said that, I have a second site which I'd like to make mobile-friendly too, so with that I might well try the other approach. The challenge of redesigning it to be adaptable while still looking good at various screen widths will be an interesting one. Edited December 5, 2014 by Bert Coules Link to comment Share on other sites More sharing options...
Ingolme Posted December 5, 2014 Share Posted December 5, 2014 Search engines are the primary way that people find websites. It's not that there's some person at Google that doesn't like your site, but that your site will be further down in search results. Statistics have shown that a majority of people searching never look beyond the first page of results. If your business has a dependency on this website, you likely will want to make sure the website is as easy to find as possible. Link to comment Share on other sites More sharing options...
Bert Coules Posted December 5, 2014 Author Share Posted December 5, 2014 (edited) Ingolme, thanks for that. I wasn't really imagining some irate Google employee fuming at my online efforts, gratifying though that would be.At the moment, anyone searching for my name will find my site listed as the first Google result, followed by my Wikipedia entry, which itself has a link to the site. Related searches for various areas of my work generate results that are almost as good. Is that likely to change if I include the files for the mobile version in a subdirectory? Edited December 5, 2014 by Bert Coules Link to comment Share on other sites More sharing options...
Ingolme Posted December 5, 2014 Share Posted December 5, 2014 There probably is not a lot of competition for using your name as a keyword, so I don't think you have to worry about that. But if you want to rank high for keywords like "BBC writer" or "Drama writer" you have much more competition. Link to comment Share on other sites More sharing options...
Bert Coules Posted December 5, 2014 Author Share Posted December 5, 2014 (edited) That's true enough, but it's hard to imagine any strategy that might improve my chances in searches that vague, and however devious I might be I doubt if the possibility of my name ending up on the first page would be any better than nil. I can live with that, though. My sites are more about giving information to people who already know they're there than they are about bringing in new work. Edited December 5, 2014 by Bert Coules Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now