Hi, I was asked to create the mobile version of a website that's already hosted. I'm using the multi-page approach (several pages in one file), Now when the links to the framework's css and js are at the top as they should be. My question is:
- do i need to name my mobile html file "home.html" just like the main page (normal website) that is already hosted?
- do i need to add the framework and css references to the files that are already hosted (normal website) or they only need to be on the mobile file that uses it?
I'm sorry for my ignorance on the subject, I'm pretty new to web development and publishing in general.
So your page structure for your mobile app is just one HTML file with all 'pages' as div's or sections within that HTML file?
You should only reference your js and css in the HTML file(s) that you'll be accessing with your mobile device, which if I understand correctly will just require you to reference them once.
It makes it a bit easier to think of the js (jQuery) and css as merely extending the function and style of a webpage / application, like branches on a tree where the main HTML file in this case is the tree trunk.
I'd like to draw you a picture of a tree but it would probably detract from the point I'm trying to get accross.
jQuery Mobile doesn't do anything about redirecting a desktop site to a mobile site. That is up to you to work out with whatever server you are using, or to implement some redirect client-side.
Your JQM site and the original desktop site have absolutely nothing to do with each other. They are two different sites, and need to be hosted either on different domains (or subdomains) or in different directories on the same server.
How you arrange the user to go to one or the other is completely up to you to work-out.
It's common, for example, to host a mobile site on m.example.com/, mobile.example.com/, example.mobi/, example.com/mobile/ etc. etc. etc. Then you need to add some server or client-side detection to the main site to redirect to the mobile site.
Leave a comment on watusiware's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic