Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

URL seen when performing site:example.com search

         

gouri

8:57 pm on Apr 18, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I performed a site:example.com search for a website that I am working on and in addition to the pages of the website displaying in the SERPS, I saw the following message: In order to show you the most relevant results, we have omitted some entries very similar to the (some number) already displayed.
If you like, you can repeat the search with the omitted results included

I then clicked the repeat link and saw the pages of the website that I saw when I performed the site:example.com search and the following url: www.example.com/scripts/siteUtil.js?somenumber

Some number represents a number.

I am not sure what the url represents and how it is coming up when performing a site:example.com search. I clicked on the url, and I saw a page with the following function code on it:

<!--
function getCopyrightDate(iStartYear, iRangeSize, separatorString)
{
var date = new Date();

// if no start year is passed in, then use the current year
if (iStartYear == null || iStartYear == 0 || iStartYear == "")
{
iStartYear = date.getFullYear();
}

// default end year to current year
var iEndYear = date.getFullYear();
if (iRangeSize != null && iRangeSize != "")
{
iEndYear = iStartYear + iRangeSize;
}

if (iStartYear == iEndYear)
{
return iStartYear.toString();
}
else
{
var separator = "-";
if (separatorString != null && separatorString != "")
separator = separatorString;
return iStartYear + separator + iEndYear;
}
}
-->

I was wondering if some of you could tell me what this url represents, how it is appearing when I perform a site:example.com search, and what does the function code mean?

I am not really familiar with what I am seeing.

Thanks.

gouri

5:43 pm on Aug 30, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



@lucy24,

I looked at my source code and saw the following:

<script type='text/javascript' src='scripts/siteUtil.js?somenumber'></script>

in the head section.

When I clicked on it (the link is inside the <script> section), I was taken to a url that has the code written in the OP. somenumber in the url that I was taken to is the same as the somenumber in the source code.

I don't see the somenumber that is in the source code and the url that I was taken to in any of the urls that are in the SERP. The somenumber in the urls in the SERP are different. Maybe in the past, the somenumber in the source code and in the url that I was taken to matched the somenumber of one of the urls in the SERP.

Can you please tell me what I am seeing here? What does this mean?

gouri

6:34 pm on Sep 4, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



@phranque, @lucy24,

do you have any type of web-based control panel access to manage your server?
something like cpanel or plesk?

I checked and I don't think that I have any web-based control panel access such as cpanel or plesk to manage my server. I think that if I had a virtual or dedicated server or hosting with FTP, I would.

When you say "don't have root access", do you mean that you can't FTP into the site (or SFTP or SSH or something web-based or, or, or), look at everything that's there, and move/upload/delete files?
Or is it one of those package deals where the site gives you the software and it uploads itself?

I can't FTP into the site. The web host has software that can be used to build a site. Files on the site can be moved, published, but there is no FTP.



I also looked and I think that there is a robots.txt file and in it the /scripts directory is disallowed. The robots.txt file is created by the hosting company.

Can you guys tell me why I might be seeing the urls in the index that I am seeing (does this information change anything) and is there anything that I can do?

lucy24

9:48 pm on Sep 4, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Crystal ball hints that you don't read javascript. And I don't think you've ever got around to saying what kind of web-site-generating program you're using. Could be something off the shelf or something made up by the host. But my guess is that the "somenumber" is an auto-generated reference to your specific site. Other people's sites will have the same code, only with different numbers.

If you've got a line that says <script src...> then somewhere on the page there's got to be javascript. It might be inside a <script> section or it might be hidden in an html tag.

If you open the js file again, you will see one or more blocks of text beginning with the word "function". Or possibly a single vast block of text with the word "function" scattered about. (Leaving out line breaks and indentation shaves a few bytes off filesize. Anyone here ever look at the code for g### analytics? :o) Immediately after each occurrence of "function" is another word. That following word is the one you look for in your page source.

Even if you can't edit your code directly, there is nothing to stop you from selecting the entire source code and pasting into a text editor so you can have a closer look. It never hurts to know what's going on. And if it's hopelessly illegible, you can insert line breaks and spaces to help bring it into focus.

gouri

3:33 am on Sep 5, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



@lucy24,

And I don't think you've ever got around to saying what kind of web-site-generating program you're using. Could be something off the shelf or something made up by the host.

It is the host's site generating program.

But my guess is that the "somenumber" is an auto-generated reference to your specific site. Other people's sites will have the same code, only with different numbers.

I added some content to the site and published and saw in the source code that the somenumber had changed. The somenumber is the same in all of the site's pages source code. This does make me think that it could be an auto-generated reference. I didn't really know why the somenumber was changing after publishing but after reading what you wrote about an auto-generated reference, that could be the reason. Can you tell me why this auto-generated reference might be created?

If you've got a line that says <script src...> then somewhere on the page there's got to be javascript. It might be inside a <script> section or it might be hidden in an html tag.

In the source code, it says <script type='text/javascript' src='scripts/siteUtil.js?somenumber'></script> and the bold portion is the part that can be clicked on and then you are taken to a url that has the somenumber in it that is in the source code.

The other script src that I see is in the adsense code, but I am seeing <script type='text/javascript' src='scripts/siteUtil.js?somenumber'></script> on pages that have adsense and don’t have it.


One thing that I am not sure about is, was <script type='text/javascript' src='scripts/siteUtil.js?somenumber'></script> there before and not leading to the urls that I am seeing in the index being generated until only recently or is this script relatively new and leading to the urls in the index being generated from the time the script began appearing in the source code?

If it is the latter, is it possible that the copyright date is not being detected and the script in the source code is being created as a result of that? Do I have to write the copyright date differently?

Immediately after each occurrence of "function" is another word. That following word is the one you look for in your page source.

I am not seeing the word function in the source code of the site’s pages. I see it in the on page text (text in opening post) when I click on the urls such as www.example.com/scripts/siteUtil.js?somenumber from the search index and on the urls I am led to after clicking the clickable portion of <script type='text/javascript' src='scripts/siteUtil.js?somenumber'></script> in the source code. Is there anywhere else that I can look?

I appreciate your help in helping me to understand this.

lucy24

9:42 am on Sep 5, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I am not seeing the word function in the source code of the site’s pages.

It won't be in your html. It could be, if you've only got a little bit of script and the function is only used once. But your site has an external .js file, so that's where the functions live. The only thing you'll find in the HTML is a brief line that calls the function by name.
I see it in the on page text (text in opening post) when I click on the urls such as www.example.com/scripts/siteUtil.js?somenumber from the search index and on the urls I am led to after clicking the clickable portion of <script type='text/javascript' src='scripts/siteUtil.js?somenumber'></script> in the source code. Is there anywhere else that I can look?

Right. This is where we came in. Now you need to step over to the HTML and find where the function is used. It might be automatic, or it might be a response to a user action.

Backtracking a bit: The typical package goes like this.

In the <head> section of the html page there will be one or more <script src> statements, and probably one or more <link rel = "stylesheet"> statements. They both do the same job: Specialized kinds of information are collected in separate files where they can be shared by everything on your site. So if the HTML says <div class = "someweirdname"> you can go to the .css file and find out what "someweirdname" does.

Also in the html, you may find something like
<script type = "text/javascript">
footnote(2)
</script>

or
<td onclick = "makePatientTable(2,1,1)">me</td>

(These are wonky examples because I'm pulling them out of my own pages.) Now stroll over to the .js file and you will find something called

function footnote(howmany)

or
function makePatientTable(mood,person,number)


You started out quoting
function getCopyrightDate(iStartYear, iRangeSize, separatorString)

So somewhere in your HTML it should say
getCoptrightDate(one number, another number, some text)

I don't know where it gets its numbers from. If your page has secret php stuff going on in the background, it probably generates the numbers and passes them to the script.

Except that if the page has already got php, why on earth is it handing off to javascript instead of finishing the job itself?

Oh, and I've got a permanent mental block on what the leading "i" in variable names means. But I'm pretty sure it does not mean it's proprietary Mac code ;)
This 35 message thread spans 2 pages: 35