Jump to content

Trouble with PW and Chrome Dev Tools


totoff
 Share

Recommended Posts

Hi all,

I'm developing a responsive Website with the following setup:

  • PW 2.5.3
  • Debug = true
  • Template caching set to one month, guests only
  • Google Chrome latest release (not the beta channel)

With this setup I'm experiencing weird problems when using Chrome dev tools:

  • changes in my templates are not reflected in the frontend until the page is saved (despite caching is set to "guests only")
  • after each page save I'm logged out from the admin and have to log in again

I can repeat this problem since days and on Windows as well as on OS X. In contrast, if I switch to Firefox Developer Edition's dev tools everything works as it should - no problems at all. So presumably it's some interference with Chrome's dev tools.

Does anybody has experienced the same? Any hints for debugging?

Thanks!

Link to comment
Share on other sites

Weird.

I only use Chrome (sorry Firefox :'( and although I have not got into specifically setting caching settings everything else you're doing I have done before and I've never seen anything like that.

My Occam's razor powered guess is: it's the step of setting caching that is somehow upsetting something that Chrome Dev tools do. Presumably you could set caching to default/out-the-box PW settings and try again and if all OK then that at least allows all dev to be done and Caching to be turned on when in production only perhaps?

Will be interested to see if a more specific answer to this one surfaces—good luck!

Link to comment
Share on other sites

My occam’s razor guess would be that PW couldn’t have anything to do with this at all, since it’s all server side, while Chrome only gets to see the final product. So it would have to be some local caching that Chrome does on its own. This admittedly dated SO thread shows a couple of settings that may be of interest: http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development

  • Like 2
Link to comment
Share on other sites

Hi all,

I've done some further testing and the problem has definitely got to do with PW's template caching: the cache should be disabled because I'm logged in as superuser but isn't.

Is there a way to disable template caching via the api during development? Or, as an alternative, how can I save all pages at once via the api? (maybe $page->save() with a foreach?)

Thanks

Link to comment
Share on other sites

Delete cache and cookies.

This was the first thing I did before posting here (I assume you refer to browser cache). Unfortunately it didn't help. And, as I said, the phenomena occurs on two machines (Win and OS X).

Link to comment
Share on other sites

Ah I was just trying :) I mixed it up with not showing cache in proache for non logged in users, cause sometimes even logging out leaves the wire_challange cookie alive thus not showing cached page.

I never experience your case and using Chrome and PW a lot though not template cache. But what I experienced also from reports that in Chrome sometimes really strange things happens, like showing a completely wrong image on a cached page, somtimes even a icon from Chrome itself!

Link to comment
Share on other sites

Try this:

1.  Clear your cache and cookies in Chrome (both machines) while logged into Chrome.

2.  Log out of Chrome on both machines

3.  Clear your cache and cookies in Chrome (both machines) while logged out.

4.  Log back into Chrome on both machines

Are you still having the same issues?

Link to comment
Share on other sites

HI Soma and cstevensjr,

thanks again for your replies. Logging out, clearing etc. doesn't make a difference. I'm afraid this

But what I experienced also from reports that in Chrome sometimes really strange things happens, like showing a completely wrong image on a cached page, somtimes even a icon from Chrome itself!

is the best answer as I've played around with it for another while and found the trouble to start when I switch to mobile simulation in Dev Tools while on normal desktop size everything is fine ... So presumably this is indeed a Chrome based problem.

Link to comment
Share on other sites

Craig, alan,

thanks, the problem persists in incognito mode. Got logged out after switching the screen resolution in Chrome Dev Tools. Very weird.

Checking the user agent with javascript:alert(navigator.userAgent) doesn't indicates anything to be wrong though it might be that extensions interfere (Google maybe or Web developer tools extension).

I'm clueless :-(

Link to comment
Share on other sites

Just turn off session finger print in config.php. $config->sessionFingerprint = false;

Or also 

$config->sessionChallenge = false;

If that's helping, it looks like you have permanent IP or Agent changes. Could be network related too.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...