target="_blank" not working in Google Chrome on mobile devices (Android) - html

I used the tag to link a pdf (which is stored in a folder in my website) with the attribute target="_blank", but it doesn't work on mobile devices (android)
My code:
Catalogue
This works just fine on desktop, it opens the pdf in a new tab of the browser, as it should with the attribute target="_blank".
HOWEVER, I tested this on mobile and the result was:
It works on iPhone using safari, BUT it doesn't work on Android using Google Chrome. Instead of opening the pdf in a new tab it automatically downloads the file.
Is there any way to change this behaviour?
I've also tried using target="about:blank" instead, but it didn't work

Try using the rel=”noopener” or rel=”noreferrer” link attributes for every link.
The rel=”noopener” link attribute prevents the linked site from receiving access to the original web page that is linking out. This prevents the linked site from taking control or otherwise influencing the linking site.
The rel=”noreferrer” link attribute hides the referrer information from the site that is being linked to. When a site visitor clicks a rel=”noreferrer” link, the site being linked to won’t know what site referred the visitor.
For example, if you code a link like this:
<a href="https://www.example.com/" target="_SEJ" rel="noreferrer">
The above link will open in a brand new browser tab.
For further guidance do visit this site:
https://www.searchenginejournal.com/blank-link-attribute/435883/#close

Related

Facebook Page Embed as iFrame not working [duplicate]

I am getting error when i try to embed Facebook page using Facebook Page Plugin
https://developers.facebook.com/docs/plugins/page-plugin/
Code
DO i need to select App ID or its optional, as it doesnt work for me i have created different App ID but it doesnt work with one or the other page which i try to embeb. I have tried same on different browser but Embed code doesnt show on page on FF browser i get following error
Firefox Can’t Open This Page
To protect your security, www.facebook.com will not allow Firefox to display the page if another site has embedded it. To see this page, you need to open it in a new window.
and on Chrome page show as below
This is how it looks on web page

whatsapp html link not working on iphone 8, chrome

I have a html whatsapp link for users to share a website link via their whatsapp application.
I have used the following links to share:
<a href="https://wa.me/?text=https%3a%2f%2fwww.youtube.com" target="_blank" data-action="share/whatsapp/share">
or
https://api.whatsapp.com/send?phone=&text=https%3a%2f%2fwww.youtube.com
*Note that the shared links are already encoded
I understand that this link will automatically launch the whatsapp app if it is detected on their device, otherwise it would just redirect them to the app store.
However, I am only having an issue with chrome on iPhone 8.
The links work fine on other browsers (Safari, Firefox, Opera)
IOS, Chrome & Whatsapp are all up to date.
Even though whatsapp is installed on the device, it still redirects me to the app store.
the App store has a button which opens whatsapp, but the send shared link message window is not present. it just opens whatsapp like normal.
Is there a fix for this?
I think, as a temporary fix at least, try making the link copy to the clipboard, then give the user an alert that it has happened. I'm not sure of how to fix it, as when I tested it it worked fine, but I'm using a slightly older version of iOS. Perhaps that means the new version made some changes about how this works?
First: Official Whatsapp Sharing Documentation. Try one of the following formats...
https://api.whatsapp.com/send?text=YourShareTextHere
https://api.whatsapp.com/send?text=YourShareTextHere&phone=123
These seem to work for me!
If you are interested in watching a project that keeps track of these URLs, then check us out!: https://github.com/bradvin/social-share-urls#whatsapp

Loading the pages in new tab using google chrome cause style problems

I've developed before a website and it was working with no issues , then now whenever you open any page in a new tab the style appear with some problems on google chrome but whenever i refresh the page it return to it's original style while when i open the page without new tab it loads perfectly , I've tried this on Firefox and it's working well when i open any page in new tab or even in the same page , so what's can be the problem ?
Delete site prefences, Browsing and downloading history, cookies, chache,offline website data, ETC. Then Try to open pages.
If this not sought out your problem then reset Google Crome. Guide here http://ccm.net/faq/6361-reset-your-browser-restore-your-browser-to-default-settings

Desktop site link from mobile site

I am working on a site that has a mobile site: http://www.exchequersolutions.co.uk/m/ I am trying to create a link to the desktop site with out much luck.
When the user clicks on a link I want them to be taken to the desktop site.
The link in the anchor tag is:
<p><a href="http://www.exchequersolutions.co.uk/contractors/cis-self-employed/cis-form/" target="_blank" class="cis_register" >Register Online</a></p>
Does anybody know how or even if this is possible?
Is not possible.
Every browser implement a function to save a link on OS FileSystem (drag&drop or file > save as ...).
You're stuck in a loop caused by user-agent detection.
It looks like there is device detection on the desktop site that uses the user-agent to identify mobile devices. If you follow a link to the desktop site using a mobile phone, you'll just be sent back to the mobile site.
There are a few different ways you can fix this, but it depends on your site architecture. One way would be to disable the redirect on the desktop site if you include a specific parameter in the query string. Another option would be to set a cookie and use that to disable the redirect.

open pdf in iphone webapp

I am trying to open a pdf from my JQM webapp. I have tried iframes/embed/object, and none of those work on an iphone like they do on a desktop browser (scrolling, zooming, etc). I have settled with simply opening the pdf via a link Link. This works fine in the standard browser because the user can simply use the browser back button to navigate back to my app.
The issue that I am having, is that when a user saves the page to thier home screen and opens it using the chromeless safari browser, they no longer have the browser back button. I have tried adding target="_blank" to the link, but apparently JQM hijacks the link and prevents opening in a new page, and I have been unable to get the hacks to work.
I have also tried pdf.js, but I can't seem to even get that to work as my javascript knowledge is fairly limited, and the examples are pretty advanced. The only tutorial that I found used an old version which I couldn't get to work.
Are there any ways to bypass the JQM in openning a link in a new window (which would in turn open in the mobile safari rather than my chromeless web app), or are there any other suggestions for how to open a pdf from a webapp?
Just disable the default jQuery Mobile behaviour, by specifying data-ajax=false.
For example:
Link
See http://jquerymobile.com/demos/1.2.0/docs/pages/page-links.html
For my webApps I used https://docs.google.com/viewer to embed the pdf into my interface.
So, when I navigate the webApp by home screen icon, the app doesn't close when I open the pdf.
I met the same question: open pdf in webapp with html5.
I've tried several solutions: iframe、embed、pdf.js, but none of them is the best solution.
tips: iOS 9.x upper, open pdf with iframe only show the first page of the pdf file, and there will be a <img /> tag in the iframe body when you debug.
util now I still have this troublesome problem, anyone has solution please write your experience here.
Thank you.