If You Use Disqus, There Might Be Issues with External Site Links When Displaying Pages in the iOS Twitter App

2016-09-14 18:50 (8 years ago) ytyng

If you are using Disqus for your blog's comment system

When viewing the page in an iOS Twitter client app and clicking on a link to an external site, it resulted in a blank page without transitioning properly.

Initially, I couldn't figure out the cause, but it seemed that the Disqus JS was the problem. (When Disqus JS is loaded, it attaches strange methods to the link event handlers)

Since I wanted to continue using Disqus, I decided to disable Disqus JS only when accessed from the Twitter client.

You can determine if the client is Twitter by checking the User-Agent. Here's a simple way to do it:

var isTwitter = navigator.userAgent.match(/Twitter/);

Currently unrated

Comments

Archive

2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011