StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #1  
Old 03-19-2012, 11:32 AM
dwzemens dwzemens is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2010
Posts: 34
Default Why does site "flash" with each page reload

I have developed several sites using the StudioPress Genesis framework. My most recent site "flashes" and seems to reload the images each time I move from page to page on the site. The header image reloads each time rather than transitioning smoothing.

Here's the site that flashes:

http://stjoesworkshop.com/newsite/

Here's another site I did a few weeks ago that does not flash but rather loads pages smoothly:

http://www.joannaforrochester.com/

It's like the one site does not cache the images and there's a forced reload each page view.

Can anyone help me out understanding why this is and how to avoid it? Thanks!
  #2  
Old 03-19-2012, 12:13 PM
NicktheGeek's Avatar
NicktheGeek NicktheGeek is offline
Forum Manager
 
Join Date: Feb 2010
Posts: 62,650
Default

both "flash" for me. It is a question of load times, there is a tiny delay that you are seeing as a flash when the page loads.
__________________
Nick "Fred and/or George Weasley" Croft
Designs by Nick the Geek
@Nick_theGeek on Twitter

Make web design easier, get FireBug for FireFox

Want to learn more about Genesis? Check out my Genesis Explained Series

  #3  
Old 03-19-2012, 12:30 PM
dwzemens dwzemens is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2010
Posts: 34
Default

Thanks Nick. I understand load time can be an issue, but even on my localhost testing server (with no appreciable load time at all) the one site flashes and the other does not.
  #4  
Old 03-19-2012, 12:35 PM
dwzemens dwzemens is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2010
Posts: 34
Default

Even when I disable all images on my local server the one site flashes the page text content on page reload. There's no way, of course, that this site is loading slowly in this situation, so I remain perplexed.
  #5  
Old 03-19-2012, 02:06 PM
dwzemens dwzemens is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2010
Posts: 34
Default

After doing some investigating I see that the issue is discussed in detail on the WordPress forums with no real answer.

However, if I turn off javascript on my sites then the flash disappears completely. So I know it is related to javascript, but I don't know how to fix the problem.

It's very ugly to look at and certainly is disruptive when viewing the websites.
  #6  
Old 03-19-2012, 06:17 PM
NicktheGeek's Avatar
NicktheGeek NicktheGeek is offline
Forum Manager
 
Join Date: Feb 2010
Posts: 62,650
Default

Again, it is related to server speeds. Completely disabeling scripts will make it load faster since it doesn't have to get the libraries being used, which means that the CSS file can load completely right at teh start.
__________________
Nick "Fred and/or George Weasley" Croft
Designs by Nick the Geek
@Nick_theGeek on Twitter

Make web design easier, get FireBug for FireFox

Want to learn more about Genesis? Check out my Genesis Explained Series

  #7  
Old 03-19-2012, 08:28 PM
dwzemens dwzemens is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2010
Posts: 34
Default

But on *every page load*? Even on my localhost with speeds not reliant on internet connectivity? I have to disagree. Something else is in play here, and I've seen reports of it elsewhere, with quite a discussion about the causes. Seems to be related to recent WordPress upgrades, or at least evident after recent upgrades.
  #8  
Old 03-20-2012, 08:10 AM
NicktheGeek's Avatar
NicktheGeek NicktheGeek is offline
Forum Manager
 
Join Date: Feb 2010
Posts: 62,650
Default

it's not internet speeds, it is the browser load times. When the javascript library files are loaded it stops fetching images and all from teh style sheet till those files are done, then goes and finishes. With cached files this takes just a fraction of a second, and you see a flash.
__________________
Nick "Fred and/or George Weasley" Croft
Designs by Nick the Geek
@Nick_theGeek on Twitter

Make web design easier, get FireBug for FireFox

Want to learn more about Genesis? Check out my Genesis Explained Series

  #9  
Old 03-21-2012, 09:16 PM
dwzemens dwzemens is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2010
Posts: 34
Default

Nick:

Is there a simple way with Genesis that I can force the javsacript to load in the footer rather than the header?

I've been struggling to try and do it by following this advice:
http://codex.wordpress.org/Function_...enqueue_script

but with no success.
  #10  
Old 03-22-2012, 01:17 AM
blogjunkie blogjunkie is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: Aug 2011
Location: Malaysia
Posts: 56
Default

You can tell the wp_enqueue_script function to output the script in the footer:

PHP Code:
function my_enqueue_scripts() {
    
wp_enqueue_script('custom-js',
        
get_stylesheet_directory_uri() . '/lib/js/custom.js',
        array(
'jquery'),
        
'1.0',
        
true
    
);
}
add_action('wp_enqueue_scripts''my_enqueue_scripts'); 
Just add the true to the end of the array and this will output the script in the footer.
__________________
Connect with me on Twitter! - twitter.com/blogjunkie
My company provides professional WordPress support (and we love Genesis too!) - clickwp.com
  #11  
Old 03-22-2012, 07:03 AM
dwzemens dwzemens is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2010
Posts: 34
Default

Thanks blogjunkie. I am not sure why your suggestion works - but it does - because the output from it references a .js file that doesn't even exist. But, for whatever reason, the annoying flash has stopped!
  #12  
Old 03-23-2012, 01:04 AM
blogjunkie blogjunkie is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: Aug 2011
Location: Malaysia
Posts: 56
Default

Glad I could be of help.

And if the code is not referencing any .js files, just put a blank custom.js in /ilbs/js/
__________________
Connect with me on Twitter! - twitter.com/blogjunkie
My company provides professional WordPress support (and we love Genesis too!) - clickwp.com
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Church 4.0 reload - Wordpress is saying "Broken Theme" lucasbaerg General Discussion 2 07-12-2009 05:36 PM


All times are GMT -5. The time now is 02:22 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.