How to Properly Setup an Exit/Panic Button with Multiple Redirects - button

I have a site that that I've built that is for a Women's Shelter, and it requires the 'exit button' or 'panic button'.. many sites just exit you to Google or another friendly site.. I see a few questions on here that solve the problem in one way or another, but this one my client is most interested in:
http://www.ncadv.org/
Can someone tell me how they're doing this? When you click on the 'safety exit' button, it redirects a BUNCH of times to different sites (thus filling the history quickly with other friendly sites).. I really like this approach, I just can't figure how they're doing it. Any ideas? I'd thought originally they were directing to sites that have their own redirect pages set up, but if you copy the initial link in a new window, it only redirects one time.

Probably via HTTP Referer. To test, run the following in command line:
curl --header "Referer: http://www.ncadv.org/" http://abconlinenews.info/localnews.php
The link, http://abconlinenews.info/localnews.php is the first outgoing link on the button.
The response (when passed an HTTP referer with ncadv.org) is:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<title>ABCNews.com: Daily News, Breaking News and Video Broadcasts - ABC News</title>
<script>
function trigger() {
setTimeout("setPage();",20);
}
function setPage() {
window.location="/localnewstoday.php";
}
</script>
</head>
<body onload="trigger();">
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.2.16 (Debian) Server at http://abconlinenews.info Port 80</address>
</body>
</html>
From there, it's probably referers and redirects all the way down ;)

One thing you might consider is using javascript to keep the history clear. If you use "location.replace('www.google.com');" for example, it will replace the current entry with the new url and there won't be a history entry to go back to.
If you used a function and passed urls to it via onClick events, you could eliminate any history from being tracked at all.

Related

Check dynamic web page is modified

I want to check if page https://m.nn.ru/f/1238 has been updated periodically.
I ran
curl https://m.nn.ru/f/1238 | head -c 4096
And it's output is below:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="1;url=https://passport.ngs.ru/check/?name=ngs_token&return=http%3A%2F%2Fm.nn.ru%2Ff%2F1238" />
<title>Redirecting to https://passport.ngs.ru/check/?name=ngs_token&return=http%3A%2F%2Fm.nn.ru%2Ff%2F1238</title>
</head>
<body>
Redirecting to https://passport.ngs.ru/check/?name=ngs_token&return=http%3A%2F%2Fm.nn.ru%2Ff%2F1238.
</body>
</html>
So I am redirected to login page and brought back to m.nn.ru/f/1238
When I open m.nn.ru/f/1238 in browser it doesn't show the redirection link but the contents of m.nn.ru/f/1238 (though I am not logged in and I think there are no cookies set)
How to get the contents of https://m.nn.ru/f/1238 ?
Another alternative is to use https://nn.ru/community/hobby/advance which has a 301 redirect
I found a workaround. I installed elinks text-mode browser and save the page:
elinks https://m.nn.ru/f/1238 > 1

OG tags not working with react-helmet and Netlify

I cannot for the life of me figure this out. The following site is hosted on Netlify and prerendering is enabled. When inspecting the page, all of the OG tags are correct. These tags are injected using react-helmet.
https://browniepoints.africa/opportunities/volunteer-at-a-soup-kitchen-every-week-on-thursdays
When scraping the above URL on the Facebook debugger, it responds with:
The following required properties are missing: og:url, og:type, og:title, og:image, og:description, fb:app_id
The only one of those errors/warnings that should be there is the app_id, which I don't care about.
I've waited well over 48 hours for caches to clear, I've tried scraping with query strings appended to the URL, and the images have absolute URLs. But not even the description tag is pulling through.
Can somebody that uses react-helmet and Netlify please shed some definitive light onto this problem?
This is related to a known prerendering issue.
My fix was to remove the <!DOCTYPE html> declaration from the index.html file as a temporary workaround until the above issue is resolved.
While I can't tell you exactly why. your SSR is not working correctly. Go to Chrome DevTools and click the 3 vertical dots next to Console:
Select Networking Conditions, then uncheck Select Automatically and enter Googlebot/2.1 (+http://www.google.com/bot.html):
Now refresh the page and notice that all you see on the site is some plaintext saying "html" and even your javascript bundle is missing. This is what your html looks like:
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="fragment" content="!">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Brownie Points</title>
<link href="/static/css/2.3bf0f3c5.chunk.css" rel="stylesheet">
</head>
<body><noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
Note that Netlify SSR is in Beta but I personally didn't have those issues with it. Have you done any other steps other than enable it? I have tested it to be working with a CRA generated app before.

facebook open graph preview thumbnail image is not showing all of a sudden

I know this has been asked several times but i am really puzzled as this just stopped working for my new links last few days. All the old links that are cached just works fine.
I have my meta tags very neat. facebook debug tool does not report any error/warnings.
Here are my meta tags ..
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta property="fb:app_id" content="820998487913242">
<meta property="fb:admins" content="param.krish.5">
<meta property="fb:admins" content="obtest.obkrish">
<meta prefix="og: http://ogp.me/ns#" property="og:site_name" content="Salefrog.in">
<meta prefix="og: http://ogp.me/ns#" property="og:type" content="website">
<meta prefix="og: http://ogp.me/ns#" property="og:url" content="http://www.salefrog.in/register_fmp">
<meta prefix="og: http://ogp.me/ns#" property="og:title" content="Salefrog.in : Register as a Freelance Marketing Partner (FMP)">
<meta prefix="og: http://ogp.me/ns#" property="og:description" content="Register as a FMP. Join us. Get a FMP login and get paid as you earn credit points. More details in your login upon registration.">
<meta property="og:image" content="http://www.salefrog.in/img/fmp-picture.jpg">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="250">
<meta property="og:image:height" content="250">
<meta name="title" content="Salefrog.in : Register as a Freelance Marketing Partner (FMP)">
<meta name="description" content="Register as a FMP. Join us. Get a FMP login and get paid as you earn credit points. More details in your login upon registration.">
<link rel="image_src" href="http://www.salefrog.in/img/fmp-picture.jpg">
</head></html>
Facebook debug tool tells me that it picks up an image but the image preview is not just there at all (looks to be hidden) as shown below.
When i click that "blank" space against the "og:image" , it opens up the image in a separate window so why does not it show up the preview image in the debug tool ?
I attempted changing the picture to different sized one's like 250x250, bigger etc. but nothing really helped. When i place one of the old cached images in the meta tag, it shows up that image. This tells me that old cached images are just fine but the newer images are not showing at all, for some reasons.
I tested using the link http://www.salefrog.in/register_fmp in the debug tool. If you guys can find some error, do let me know as it would really help me save time than i break my head to fix it all by myself.
I fixed the problem. It was due to the .htaccess which was blocking(or not letting the facebook ) to parse the image which was the reason that it threw a blank image , not showed any error.
How i fixed or analyzed the whole problem ?
Since there are no errors reported by the facebook debug tool and nothing seen in the apache logs, i suspected it could be that the tool itself does not sense any error with the whole process hence it must be something to do with the image itself OR something in-between.
Requests from facebook hits my webserver which has a .htaccess to redirect to a separate php that responds back only the meta tags , nothing else.
As there are no errors reported in facebook debug tool or in my webserver httpd logs, it could be two things that is causing the problem.
Image itself (could be the location of the image or the image is
corrupt or its size or aspect ratio or other format)
facebook debug tool has a bug (very unlikely but cant rule out )
(.htaccess) that does the redirection when the request comes from fb
As i have reasonably no doubt with the first two, i went to the 3rd item in the list.
I suspected the requests from fb is not fetching my images possibly due to the redirection happening for the "HTTP GET" to the image requests as well.
SOLUTION
I added the following line in the .htaccess just before the redirect so that all the image requests directly goes to the file, which just fixed the whole problem.
..
RewriteCond %{HTTP_USER_AGENT} ^(facebookexternalhit)
RewriteCond %{REQUEST_FILENAME} !(img|css|jp?g|png|store_images|category_images|fonts|awesome|ttf|tif|custom_images)
..
I know in most cases it might be something to do with the errors in the meta tags or in the image itself. But, in my case , it was not both.
Hope this helps someone out there !!

How to detect HTTP UA for a hyperlink from powerpoint

Quick help .. i have a website which is not designed for IE hence i have written php code to read the http ua string to check if it "msie" string exists and redirecting to another page which shows the appropriate message. The trouble with this approach is that when i click the link from MS powepoint 2007 the page redirects to another page though my default browser is Chrome..
I figured that UA is getting set as "mozilla/4.0 (compatible; msie 7.0;" when i click the hyperlink from powerpoint. Is there any other field which can be used to judge that the request is coming from Powerpoint
36 minutes ago ยท Like
A really annoying bug in PowerPoint. A possible workaround is creating an empty page that contains a meta redirect to the URL you want to redirect to. Just dynamically replace the url you want to redirect to each time you go to this redirect page:
<!DOCTYPE html>
<html>
<head>
<title>Redirecting...</title>
<meta http-equiv="refresh" content="0; URL=**MYREDIRECTURL**" />
</head>
<body>
<div>
Redirecting...
</div>
</body>
</html>

How to force Images to be loaded all the time, ASP.NET

I am serving a .aspx that contains Images. I haven't figured out yet how to force ie7(6) to fetch the images all the time (e.g redirects).
So far, I've added the following tags on my .aspx page:
<META Http-Equiv="Cache-Control" Content="no-cache">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">
And still, if I click the URL Bar and hit enter or do a redirect to that same page IE won't re-fetch the images.
What am I missing?
Other Notes:
ISS 5
IE7 7.0.5730.13
Works on Firefox and everywhere else but IE
Redirect Code:
Response.Redirect("url...", true);
You might just put a unique tag on the end of your image URLs to make sure the cache isn't hit. For example
<img src="/path/to/image.jpg?<%=DateTime.Now.Ticks.ToString()%>" />
Granted, if you're using WebForms you'll want to do it a little different, but still along those lines.
IIS is probably overriding those settings. Go into IIS Manager and find the folder where your images are located. Right-click and select Properties. Click on the HTTP Headers tab. Check the option "Enable content expiration" and "Expire immediately".
See http://www.enhanceie.com/redir/?id=httpperf for an explanation of how HTTP caching works, and how you can cache or not-cache your files.
I don't know exactly why, but we solve a similar problem adding these lines to the aspx.cs file, in the PageLoad Event:
//Turn off cache
Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
Response.Cache.SetNoStore();
It could be useful to solve your problem too
http://royriojas.blogspot.com/2009/04/dealing-with-back-button-and-secured.html

Resources