Open zslabs opened 12 years ago
Shouldn't the CSS/JS load on the initial page load (when you first visit the site)?
Not necessarily - think about how you can conditionally enqueue scripts and styles based on well... a lot of things - page templates, shortcodes (what I think is happening here), etc. I agree the way in which WordPress loads scripts is a little different than how PJAX is normally considered to be used for (think of Rails apps -- as I understand it, everything is there on pageload), but may merit some thought as plugins/themes can take advantage of this (not just Gravity Forms, but since GF is quite popular, would be good for testing). Thanks!
That's a good point, I'll send additional headers X-WordPress-Head
and X-WordPress-Footer
and handle logic accordingly client side.
You sir = genius :)
I think adding in those headers will also help the front-end admin bar update as each page is clicked (currently is not altered on page-load).
Are you referring to the WordPress admin bar, when you're logged in?
Yes'm. Just guessing here, but that is probably added via wp_footer() -- just reaffirming the header additions though :)
I referenced the wrong issue number, but I've pushed a commit that attempts to address this. Comments/testing welcome. 2b9bbdfc7eb6fb34ff0da11f5dc98903d9526084
Currently breaking a whole bunch of things when injecting in things other than self closing or Githubissues.
Hey, Was doing some testing with Gravity Forms specifically and noticed that the CSS/JS for Gravity Forms doesn't actually load on a page generated via PJAX until you do a hard refresh. Just thinking ahead -- should checks be made to refresh wp_head() and wp_footer() to ensure anything that has changed in those areas is added? Thanks.