Forum Moderators: open
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.
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...]
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! :(
P.S. The only thing I can think of is that I always use absolute URL paths for external file references.
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.
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.)