homepage Welcome to WebmasterWorld Guest from 54.205.254.108
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google News Archive
Forum Library, Charter, Moderator: open

Google News Archive Forum

    
Google parsing javascript
Including external .js files
amanda21




msg:136323
 9:55 pm on Nov 30, 2002 (gmt 0)

I've just checked the google cache of one of my sites and noticed that google has parsed an external js file in the last update (this week).

Its a simple document.write javascript and the output is showing up on the cached page.

Another site that uses frames (yep I know) has a javascript that writes a frameset if the page is opened outside of its frameset - the cache of this is showing up as a blank page, as if it was an html frameset.

Is this new or did I just miss it until now?

And what will google do with javascript redirects - the kind that check for a frameset and redirect if its not there?

If it indexes the frameset it redirects to, I am looking at many hours of convincing frame-loving clients to ditch them - please tell me it isn't so :(

 

heini




msg:136324
 9:59 pm on Nov 30, 2002 (gmt 0)

Hmm, there is a second report on a problem with Google and JS in this update:
[webmasterworld.com...]

Markus




msg:136325
 9:29 pm on Dec 1, 2002 (gmt 0)

Google does not parse the JS. In Google's cache, your page is as it is. Of course, all the JS commands are in there also. It's your browser that parses the JS. If there is an external JS file, your browser gets it from your server. Normally, the external JS file is linked relatively and, therefore, there is a base tag in the little bit of HTML that Google puts into the cache pages.

Regarding the cache of the frames page, did you disable JS in your browser before you checked it?

omegadm




msg:136326
 5:24 pm on Dec 2, 2002 (gmt 0)

amanda21

Are you talking about this:

if (top.location = location){top.location = "http://www.url_to_framset"}

This used to work fine for us on Google (last checked maybe 3 weeks ago). But now pages with this code go into an infinite loop of reloading.

I am really getting fed up with Google - especially after reading:
[google.com...]

Anyone any ideas about getting round this?

Brian

omegadm




msg:136327
 7:24 pm on Dec 4, 2002 (gmt 0)

Just noticed my deliberate mistake [blush]

top.location = location
should be:
top.location == location

Can't believe it still catches me out!

amanda21




msg:136328
 4:39 pm on Dec 5, 2002 (gmt 0)

pretty much, except i use

if (window == top)

I have switched from doing a redirect to writing the frameset into the current page, that way the page isnt actually redirecting. Not sure if it matters too much at the mo, but it might someday soon.

When is the infinite loop happening, in the google cache page? I can't see how google could affect the operation of the script like that, but I could be wrong.

BTW the == gets me too, too much jumping from asp to php ;)

omegadm




msg:136329
 5:04 pm on Dec 5, 2002 (gmt 0)

The infinite loop was my "=" and not "=="

I am also switching sites over to loading orphaned pages into a framset (rather than just redirecting). If it helps, the .js and .html code is below:

.js
====
function loadFrameset(){
passpage = document.URL
if (top.location == self.location) {
top.location.href="master.htm?" + passpage
}
}

master.htm
===========
<script language="JavaScript" type="text/javascript">
<!--
origURL = parent.document.URL

document.write('<FRAMESET rows="58,*" frameborder="NO" border="0" framespacing="0">\n')
document.write(' <FRAME name="topFrame" src="pages/bsa/new_top.htm" scrolling="NO">\n')

if (origURL.indexOf('?')!= -1){
contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
document.write(' <FRAME name="mainFrame" scrolling="AUTO" noresize src="' +contentURL+ '">')
}else{
document.write(' <FRAME name="mainFrame" scrolling="AUTO" noresize src="pages/bsa/home.htm">')
}

document.write('<\/frameset>')
//-->
</script>

HTH. Brian

amanda21




msg:136330
 7:14 pm on Dec 5, 2002 (gmt 0)

Cheers

I am doing something pretty similar, except that the frameset code is written between the head and body of the current page, rather than redirecting to a master.htm type page.

I won't post the code, don't want to get told off for turning this into a js forum :)

If you're interested, sticky me and I'll send you a copy.

hazmat




msg:136331
 7:53 pm on Dec 5, 2002 (gmt 0)

I am really getting fed up with Google - especially after reading:
[google.com...]

What's wrong with this?

omegadm




msg:136332
 11:04 am on Dec 6, 2002 (gmt 0)

hazmat:

Most of it is fine - they are legitimately trying to get rid of some of the bad practices that exist in our industry - and I agree.

However some of the points are extremely naive and are damaging in themselves. For example see the sections:

Talk to many SEOs...
Make sure you're protected legally
If you feel you were deceived by an SEO...
and most contentious of all, their piece on Doorway sites/pages

Brian

[edited by: Marcia at 1:28 pm (utc) on Dec. 6, 2002]
[edit reason] Please see stickymail [/edit]

amanda21




msg:136333
 3:59 pm on Dec 6, 2002 (gmt 0)

The doorway page paragraph is a bit heavy, but unfortunately it is often true.

I know of one company who paid 1,000 for a bunch of these doorways last year - they are all part of a link network with the seos other clients, all have pr0 and the pr of the main site has dropped.

I have warned them several times, but they have just paid out for a load more (in an attempt to increase their falling visitor count) - I give up.

Anyway, does it really matter what google says on that page? How many people are going to read it anyway, apart from seos that is?

omegadm




msg:136334
 4:14 pm on Dec 6, 2002 (gmt 0)

As this thread is diverging - I have set up a new thread relating to the "Google SEO comments"...

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google News Archive
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved