Forum Moderators: open
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 :(
Regarding the cache of the frames page, did you disable JS in your browser before you checked it?
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
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 ;)
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
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.
I am really getting fed up with Google - especially after reading:
[google.com...]
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]
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?