I would like to craete a link to other page but without letting know Google Analytic (GA) that user is comming from my site. So field "utmr" need to by empty (0 | - ) and it must looks like user will enter www address in browser. Is there a any way that GA will not be able to read source website’s address?
<a href="http://domain.com/a.html" > Destination A </a>
Destination A with rel
<a href="#" onclick="javascript:location.href='http://domain.com/Javascript.html'" > Destination javascript </a>
I have tried javascript, a html tags but with no success :/ Any help will be appreciated.
--
Jacek
Check out the answers here PHP - Referer Redirect Script.
Basically, you cannot do this without having a site, such as DontKnow.me or LinkAnon to do a redirect. You can create your own script to do it but yea, it will still show coming from your site.
I would really take a look at that PHP Post though, it has great information regarding this and why you cannot do it.
EDIT
However, if you have control of the page you are redirecting to, you can probably find some method to override that setting if the referer is coming from your site. But that is assuming you have control over the site you are redirecting to.
Related
I want to post some data to other web page from my page using a pseudo-form. If user post something using the form of my page as a result this will be posted to a target page of other domain which exist to a different server.
Say my site is http:// abcd .com and the target site is http:// xyz .com
If user post a comment using my form this will be posted to xyz.com.
First I tried as followed:-
$.ajax({
url:'http://xyz.com/cmnt_next.php',
type:'post',
data:{'cmntid':100,'user':'guest','cmnt':'Hello world'},
success:function(result){
alert("res: "+result);
}
});
Finally I found that ajax dose not send request to external domain. I don't have any other Idea to do it. I want to know what is the legal way to do it, with their permission. What do I need to know to get access to post, also if needs to 'Login' to the target site before posting through my webpage. I need any tips & solution to do this thing.
Thank you...
The "legal" way to do this would be to use an API that the site provides for you to log in and/or make posts to xyz.com. If they don't, then they probably don't want you to do this, and then you probably shouldn't be doing it.
I'm not really sure this belongs here, so instead of downvoting just lemme know if so and I'll quickly move it on.
Anyway, there is a website that has a search page, that when hitting the search button it doesn't include the search query in the URL.
After searching for something, the page is redirected to ssearch.asp, but as said, the query isn't there.
My question is if there is a way to submit the search values solely via URL.
I was wondering if there is a way to fake the search-submit button and post the search term
via URL according to form field names.
The name of the input box is search, so I tried this URL: http://www.torec.net/ssearch.asp?search=query, but it doesn't work, the server returns:
server error.
Just to be clear, I'm not looking for a server-side solution, and actually nor for a HTML solution, I just want to be able to paste a plain old URL in my browsers address bar and be there.
Is this possible?
Update
This link doesn't work:
http://www.torec.net/ssearch.asp?search=dark&page=1
While this one does:
http://www.torec.net/ssearch.asp?search=dark&page=2
Any way to bypass this?
Sometimes servers conflate GET and POST parameters, as in PHP $_REQUEST hash. However, normally they are separate - and a server that expects its parameters in multipart/form-data might not look at URL at all. In such a case, as it seems to be here, you have to construct a POST request. On the client side you can do it through AJAX or through constructing and posting a form; on the server side, you can use curl, or a library. You did not say what you want to use it for (and where you want to use it), so you just get the general answer, I'm afraid.
EDIT: Here is the JavaScript semi-solution. You have to already be on some page (i.e. can't use it on _blank), and I'm not sure if it works on all browsers.
javascript:d=document;f=d.createElement("form");h=d.createElement("input");f.setAttribute("method","post");f.setAttribute("enctype","application/x-www-form-urlencoded");f.setAttribute("action","http://www.torec.net/ssearch.asp");h.setAttribute("type","hidden");h.setAttribute("name","search");h.setAttribute("value","query");f.appendChild(h);d.body.appendChild(f);f.submit();
Edit: It is not possible to create a link directly to the first page. However, you can easily send a user to the first page by by creating a form:
<form id="postForm" method="post" action="http://www.example.com/search">
<input type="text" name="search" value="q">
</form>
And then submitting the form whenever the user clicks a psuedo-link:
document.getElementById("postForm").submit();
This can also be done by typing JavaScript code into the address bar:
javascript:a=document.createElement("form");a.method="POST";a.action="http://www.torec.net/ssearch.asp?search=dark&page=2";i=document.createElement("input");i.name="search";i.value="q";a.appendChild(input);a.submit();
I'm a bit in a sticky situation.
I'm developing a mobile website with jQuery mobile 1.1.1. Its a pure javascript html5 implementation.
The anatomy is like follow:
1 HTML page called index.html containing a complete HTML structure with header, all includes (javascript/css etc), body etc. This page redirects via $.mobile.changePage('login.hml') to a login site.
X sub-sites containing only <div data-role="page" data-theme="a" id="x" data-title="x"> and site specific html/javascript code.
This works fine so far. The only problem is, when I refresh the page (with F5 for example), I'm always redirected to the login site after the refresh.
Example:
I'm on the following site (url):
http://mysite/mobile/web/#/mobile/web/list.html
then, I press F5 for refreshing the page.
The refresh is done and afterwards i get redirected to:
http://mysite/mobile/web/#/mobile/web/login.html
How could I prevent this behavior?
When refreshing you page your browser will interpret the URL as the page you want to display as http://mysite/mobile/web/ which is why you open your index.html, which redirects you to login.html.
There are 2 possible fixes:
modify your redirection so that you parse the target URL and identify the intended location (everything after the #, in you example /mobile/web/list.html) and redirect to this given page.
You should of course first check if your user is logged properly in order to redirect to login.html if necessary.
you can also modify the URL used by your list.html page so that it properly uses http://mysite/mobile/web/list.html (if that is indeed where your file is stored). I would not favor this approach as it will require you to add all the proper header information in this page also, and I feel it easier to conform to the JQuery Mobile spirit by having a single entry point to your site, handling dynamically the destination of your user
I have a problem relating to relative links in href. To make a long story short, I think an example is the best way to get what's going on.
On tinhte.vn/threads/300021/, it is a discussion forum, to go to the page 2, we click on [2].
I view source code of [2], its content is 2.
If I do not misunderstand about relative links, this will append threads/30021/page-2 after the current link, which is tinhte.vn/threads/30021/, and we have the link like this:
tinhte.vn/threads/300021/threads/300012/page-2
But in practice, when I do in the browser, mine is chrome, the link is:
tinhte.vn/threads/300012/page-2
Anyone please explain why?
Sorry, due to the spam prevention, I cannot post direct link.
Thanks in advance.
The link will correctly go to tinhte.vn/threads/300021/threads/300012/page-2 as you guessed. However, looking at the response from a request to that url we can see that the page redirects to another url. I used web-sniffer to quickly see the raw response from the server.
The interesting part of the response is this:
<input type="hidden" name="redirect" value="/threads/300021/page-2"/>
The browser will react to this and navigate to the specified URL. Hence the observed behaviour.
Read more about redirects here.
Would be great if you guys could shed some light on this, has baffled me:
I was asked by a client if I could try and make the search term for his comedy night "sketchercise" put his website top of the Google ranking. I simply changed the title tag of the header for the whole site from "Allnutt and Simpson" to "Allnutt and Simpson - Sketchercise # Ginglik - Sketch Duo". It did the trick and now the site comes up top of the Google listing when typing in "sketchercise". However, it gives off this very strange link:
http://www.allnuttandsimpson.com/index.php/videos/
This is the link to the google search result too:
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=sketchercise
This link is invalid, it doesn't make any sense. I guess it has something to do with the use of hash tags and the AJAX driven site, but before I changed the title tag, it linked to the site fine using the # tags. What is the deal with this slash?
The strangest part is that the valid URL for the videos page on that site is /index.php#vidspics, I have never used the word "videos" in a url!
If anyone can explain the cause of this or just help me stop it from happening, I'd be very grateful. I realise that this is an SEO question and I hate that stuff generally, but I hope you can see this is a bit of a strange case!
Just to compare, if you google "allnutt and simpson" it works just fine links to the site and all of it's pages absolutely fine as .php pages (and then my JS converts them to hash tags to keep things clean)
It's because there must be a folder called 'videos' under your hosted files, use an FTP client and check this.
Google crawls every folder and file unless you tell him not to do this, look for robot.txt files to learn how to avoid indexation.
Also ask google to remove that result when you solve this.
Finally that behaviour is not related with hash tags, these are just references to javascript in order to display the appropiate content in you webpage.
Not sure why its posted like this but the only way to stop that page from appearing is using a google webmaster account for this website and make sure the crawlers can't find this link anymore. The alternative is have the site admin put this tag, <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> , in the header when isset($_REQUEST(videos)) is true.
The slash in the address is the parsed form of www.allnuttandsimpson.com/index.php?=videos. You can have the web server change all the php parameters into slashes to make the links look pretty.
Best option for correct results is to create a sitemap and submit it to https://www.google.com/webmasters/tools/ for that site. You will need access.
Oh forgot, the sitemap will make google see all the pages you want it to post, use this for the major pages like those in the main menu. To remove links you don't want requires a robots.txt in the main directory of the site.