Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Does not render background of this page #48

Open
PhilAndrew opened this issue Dec 24, 2013 · 4 comments
Open

Does not render background of this page #48

PhilAndrew opened this issue Dec 24, 2013 · 4 comments

Comments

@PhilAndrew
Copy link

http://www.bbcgoodfood.com/recipes/beetroot-bacon-cheddar-bread-scrolls

@jaydiablo
Copy link

It looks like that site is responding with its mobile version to the phantom renderer, as you can see from the header of the page (even if the userAgent is forced to match my desktop Chrome browser):

screen shot 2013-12-24 at 10 57 22 am

I thought it might be the size of the viewport, but the background is present in 1024x768 on my desktop browser:

screen shot 2013-12-24 at 10 59 15 am

On my ipad, it renders similar to how phantom renders it (no seasonal background, mobile menu at the top).

screen shot 2013-12-24 at 11 11 29 am

I'm not certain if this is phantom's fault (not rendering the bg), or this site's fault (not serving the same html/css to phantom).

Regardless, I don't think this is really the screenshot service's responsibility, since phantomjs is primarily responsible for the rendering (assuming it's not the site's fault).

@PhilAndrew
Copy link
Author

Hi Jay, so I turned off Javascript and it renders OK with Javascript turned off, so I guess its something in the javascript of this page which auto-detects (wrongly) that we are a mobile browser.

https://gist.github.com/PhilAndrew/8220147

@PhilAndrew
Copy link
Author

It still bothers me, why it thinks its a mobile browser (wrongly), I wonder if its Modernizr library?

@PhilAndrew
Copy link
Author

I'm a little bit obsessed as to why.

In the QupZilla browser it also shows in mobile format (incorrectly). http://www.qupzilla.com/

Clearly its not a bug of either PhantomJS or your code but I really wonder why.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants