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

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?

Related

IMG src='file//..' does not return expected image BUT the same file//.. in navigation bar does

I'm developing a page that uses an image from a Networked File System.
The HTML is:
<img src='file://192.168.1.25/dir/subdir/fname.jpg'/>
and the image does not display.
However when I put
file://192.168.1.25/dir/subdir/fname.jpg
directly in the Navigation Bar the image displays with no problem.
I've already researched the problem and saw a lot of answers about slashes (the number of them and type - forward or backward) and also some bizarre suggestions but no definitive answer that works. I'm sure there must be a very simple solution. If I can display the image perfectly from the Nav Bar, I can't see any reason why the img src= would behave differently (but then browser developers may be strange beasts and they certainly all do it a different way).
I suppose that an http://... link in the src= would work fine but I was trying to avoid mounting a Web Server on the source machine just for this purpose as the Web App is destined to be an internal web where all the authorized users will have access to the Networked File share and the source machine is destined to be in an externally available environment with various daemons handling all external client communications and other tasks.
I'm testing with Chrome right now and have not tried it on other browsers but I really need a portable solution that would work on MOST if not ALL HTML5 browsers.
Thanks in advance for any insights.

downloading parts of a html page on an event

I am developing an universal windows app. I need to download a webpage and extract images from it.
I got the html code and extracted the links to images and downloaded them. The thing is, the site has infinite scrolling (like facebook). When I scroll down to the bottom it loads more images. I am not able to incorporate this into my app. I am a beginner and have very little knowledge of web development or windows app development. This is my first app. I am stuck and have no idea how to proceed. I don't want to use webview as it displays ads from the site and other unnecessary contents. I only want the links to those images. Please help me go past this situation. I need a way to download the new html content that the site loads when user gets to the bottom or some other way to get the image links.
Thanks in advance.
You may or may not be a me to implement this specifically because of the reason you stated. You need to determine how the site loads this information. First I would download Fiddler and in turn enable https connect logging so you can see your encrypted traffic going through Fiddler. Btw the Web View has events you can hook to see loading URLs, etc and it can also be hidden.
So again you need to first understand how the site you want to do this on works and emulate that, assuming they don't have an api already to give you this information as mentioned I'm the comments.
When you do that, come back with code examples and you'll get better help.

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.

Widgets and .mobi sites, is this possible?

I have a couple of concerns, I'm busy building a normal .mobi site for a client, so basically how I understand this is keep it simply since most phones do not support JavaScript and have a small screen etc. So I build a mobi site using only content and basic links. Now my question is how do mobi widgets work on a mobile site? I've googled and could not find a answer? Is this possible at all? Since these small sites are meant for normal entry level phones and not smartphones?
.mobi is a domain suffix generally used to identify that the content is specific to mobile devices. It doesn't imply any association with Widgets.
Mobile widgets are generally specific to operating systems, and their definition varies across mobile OS's. Nokia Web Runtime Widgets for example use the webbrowser and provide access to device specific API, but it is native to S60 and needs to be installed on the device. Not what you or your client want here I think.
You have couple of options for developing mobile web sites. Have a look at the answer I gave here. It may help point you in the right direction. Search also for questions related to DeviceAtlas, who also provide similar API to WURFL.
Worth also taking a look at this answer.