Responsive, Adaptive. A method of serving up 2 or 3 websites - html

I'm new to dealing with responsive website design but from what I have dabbled with its showing some great results.
I was wandering if some responsive experts can give some advice on serving alternative websites based on a mediaqueries for certain devices
Scenario A : If person a is using a desktop computer, serve this website to that device (HTML page 1)
B) If person is using a tablet, then serve mobile website. (HTML 2)
But I will go further to say, Can you use this sort of method to deal out completely different html pages? eg mobilehtmlpage.html desktop.html if that makes sense?
Thanks for your help!

You'll need to check to see what the "Web User Agent" is set to. This is basically the name of the browser.
You can do this in PHP like this: http://php.net/manual/en/function.get-browser.php
Here's a list of User Agents: http://www.useragentstring.com/pages/useragentstring.php
Once you check the User Agent, you'll be able to redirect the user based on this information (for example - subdomains: mobile.mysite.com and www.mysite.com). A lot of websites do this.
OR You could make a website that looks good regardless of the width of the browser, meaning you wouldn't need to redirect the user or know the user agent. This is my preferred method!

Related

social network share links not working on desktop (fb://... whatsapp://...)

When I use this kind of links
fb://sharer.php?u=...
whatsapp://send/?text=...
They work perfect on mobile devices, because the related application is opening (facebook or whatsapp) and ready to share the URL.
But when the links are clicked from a desktop computer, as the applications don't exist there, they are failing and returning an error page.
I would like to solve it using an elegant solution, for example, changing the links:
fb://sharer.php?u=...
Into:
https://www.facebook.com/sharer.php...
Which should work in desktop computers...
But to do that I would need a good way to determine which kind of device is visiting my website.
Is there a popular/working way to determine the visitor device? How would you fix it?

recognize whether a page is for pc or mobile device?

I have a list of URLs and I am going to recognize if the URL is for pc or mobile.
the HTML page of the URLs have the certain mark for pc or mobile ?
There is no distinct way to recognize by certain URL whether website this URL pointing to is built for a mobile devices. There is no way even to recognize whether URL points to a website, it can be some resource, service, etc.
Some websites do not aware from type of the client, another have their own rules, for example, they can use subdomain like http://m.domain.com/. A large part of websites use Responsive web design, having thus common content for any client type.
But there is no common rule or standard.

Need a mobile friendly website working exactly the same functionally as the one which is online

I work for telecom company in India. My work involves checking the connectivity of the network through IPs and the ping through it. Our company has a website http://117.239.43.170/ping_select.aspx for it. The problem is the website isn't mobile friendly and I need to zoom in and out every time I go to that site. I am familiar with the basics of front end. I have created the mobile friendly version of that website and stored it in my mobile, but it is redirecting me to the same website. So my question is, is there any way I can use a mobile friendly version of that website and still get the same results
I recommend you making an android application and control (send and receive) the website in the background. This website uses a HTML form and very few inputs so it wont be that hard to go with the java staff.
Alternatively you can make a browser plugin for your phone browser to control the website in background and at the front end you get your desired UI.
I guess you dont have the access to upload your website to that server so you cannot request to your BSNL server from a local website (or whatever else). The BSNL server wont allow cross server requests. The best bet you can make is layering below that website over any other programs.

add other link when on device or desktop

I have to make an email.
When you open the email on a device all the links has to refer to the m.website.be, but on a desktop it has to refer to the website.be
Is there a way to do this, and that works in every mailclient ?
thanks in advance
You cannot make it, some email clients even don't understand HTML.
The only way I know is to make it on a server side when your client tries to open the website.
When he comes from the desktop - redirect to the desktop.
When mobile - redirect to mobile.
Everything is easy.
If doing a redirect on the actual site itself is not a possibility then the only way I can think of is by applying CSS media queries and hiding the m.website.com link for desktop and hiding the non m.website.com link for mobiles. You may run into issues here where some clients dont pick up on the media query.
If you really really really wanted to do the trick, you could do something like this with mime/multipart messages and alternative contents (i.e. writing the content to each alternative with different URL). However, even in that case you should be able to control which alternative the receivers email client opens. Some mobile clients might always open text/plain.
Since the solution will not fully meet your needs, I will not go into details. If you want to know more, read the rfc:s related to mime/multipart email content.
I recommend you leave it to your reader by writing the email like this:
"If in mobile device open m.website.be, on a desktop, please use website.be." or even better, use the server side redirect that most websites do anyway.

Needs To create a widgets for websites and stand alone desktops.?

i have to create widgets for whether reports and etc. to my website. what are all the needs to create widgets? is Css5 and Html enough to make a attracting widgets?? can you provide me the correct way to do that ...
Update Question :
i have got some more ideas to make widgets for websites and how we can add into our web pages. and now i have to do widgets for desktops like windows 7 desktop widgets. is it possible? and what're all the needs to make it??
Thanks in advance.
The widgets are generally not developed by the people who run the websites they appear on. Instead the weather widget might come from a weather site that provides data to. The widget is provided as code for web developers to paste into their site. These widgets refer to the maintained weather website (images, data, etc...). Some of them allow for a small level of customization, so you can use your own colour palette to make it blend with your site, or toggle rounded corners etc...
As a start a quick google search brought me to google's gadgets page which will get you started. I don't doubt that they are customizable through some minimal CSS. Changing borders and such.