Forum Moderators: open

Message Too Old, No Replies

Testing CSS to improve cached page display

         

HarryM

5:00 pm on Nov 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am sure this subject must have come up before, but I can't find anything specific to my problem.

Some of my pages render badly when cached. Probably a few Google-specific tweaks to the CSS will improve matters. (I hope. :) ) However currently I can only test these tweaks once per month at Google update time, which just isn't practical.

Is any one aware of a testing facility that duplicates whatever Google does to pages? Or a browser that is close enough to Google to use for testing?

Greatful for any help / suggestions.

Nick_W

5:09 pm on Nov 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good Call Harry!

Most of my sites look dreadful on the G cache.... Any Google techs have an idea of how this works?

Nick

HarryM

10:02 pm on Nov 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nick,

Absolute silence! Which presumably means no one else is afflicted with the problem or they don't have any answers.

Guess I'll just have to keep on trucking.

Harry

Nick_W

11:04 pm on Nov 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's weird 'cos google doesn't not link to stylesheets but, it doesn't seem to use them the same way your browser does...

Anyone?

Nick

Longhaired Genius

11:25 pm on Nov 30, 2002 (gmt 0)

10+ Year Member



I would say don't worry. I remember someone saying that this approach would mean treating the Google cache as yet another browser you have to test with - but you can't test with it!

I believe that hits on the Google cache are relatively low so I just don't worry about it's quirks. Just make valid pages and let Google take care of its cache.

Nick, Pages in the google cache do refer to their stylesheets. Google uses the BASE element to accomplish this.

[w3.org...]

Brett_Tabke

11:39 pm on Nov 30, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Not sure what the problem is, but it's all right there to see what Google is doing. Just load up some of the cached pages in an editor and it's easy to add that overhead code to your pages.

Cached page viewing can be extremely high in some kw sectors.

HarryM

11:39 pm on Nov 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have put some more thought into this.

My pages are generated using PHP and include links to stylesheets dependant on the browser. If the browser is not recognized, such as googlebot, then default stylesheets are linked to.

My guess is Google caches any stylesheets that are linked to on the page, and currently these will always be the default stylesheets. When I look at the cache the rendering degrades because the stylesheets are unsuitable for my browser.

So I suspect I can't do much about it. If I make the defaults suitable for IE, then they won't work for NN, etc. And of course Opera is going to screw up whatever I do. The usual story! :(

pageoneresults

12:03 am on Dec 1, 2002 (gmt 0)

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



I'm not seeing what you guys are. I have many sites using css and they appear fine in the Google cache. In fact, because of the absolute positioning, my navgiation header includes sit right on top of the Google message so you cannot see it. The pages look almost identical to the real ones. What gives?

P.S. The only thing I can think of is that I always use absolute URL paths for external file references.

Marcia

12:34 am on Dec 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Makes sense, p1. There were people using JS redirection with relative URLs and that didn't work with the cached pages, it brought up an error. They now seem to be using absolute URLs in the JS redirects for cached pages and it looks like it's working for them just fine. I've also seen absolute URLs used for meta refresh now - that seems to work, too. Same principle, I guess. ;)

HarryM

12:43 am on Dec 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



pageoneresults,

I don't think it would matter in my case if I used absolute or relative urls. Google only sees and caches my pages after they have been through PHP, and as googlebot won't be recognised, the only style sheets that will be linked to will be the default ones.

If you only have one stylesheet - or don't use CSS - then the pages in cache will always look like the actual pages when you use the same browser. The problem only arises because I use selective stylesheets.

HarryM

1:01 am on Dec 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My last post probably wasn't very clear - it's nearly 1 o'clock in the morning here in the UK! :)

Essentially my stylesheets links are created to suit the browser when the page is generated. Therefore after they have been cached there is no way a different stylesheet can be selected. (It could be done with javascript, but not with php.)

Jon_King

2:55 am on Dec 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On my site with layers, the absolute position of the layers is incorrect due to the extra header area that contains the Google cache info.