Aureole Posted October 14, 2007 Share Posted October 14, 2007 Ok this has only started happening since I started using classes, on some pages when you go to them the page flashes white for a second or two before beginning to load, I know this is not normal behaviour because what normally happens is you click a link and the page you are on stays on the screen until the next page has loaded then it switches instantly... I'm sure it's something related to my code as it on some pages this doesn't happen and on others it does... I can post the code if you want but I'll just see what people have to say first. Thanks a lot. Quote Link to comment https://forums.phpfreaks.com/topic/73169-page-flashing/ Share on other sites More sharing options...
Aureole Posted October 14, 2007 Author Share Posted October 14, 2007 After a little checking I found that the files where this happens seem to have require_once more than the pages where it doesn't happen, perhaps it is something related to that? EDIT: I changed all instances of require_once to require and the page in question no longer flashes, this is indeed strange. Does anyone have any idea why this happens? Quote Link to comment https://forums.phpfreaks.com/topic/73169-page-flashing/#findComment-369080 Share on other sites More sharing options...
trq Posted October 14, 2007 Share Posted October 14, 2007 Are you using any sort of buffering? ie; ob_start? Quote Link to comment https://forums.phpfreaks.com/topic/73169-page-flashing/#findComment-369082 Share on other sites More sharing options...
Aureole Posted October 14, 2007 Author Share Posted October 14, 2007 I am most definitely not, no... One thing I was doing was using require_once() for the header and footer files as well as the classes/functions, I changed everything to require() and the flashing ceased to exist. I should probably change it to include() as that's more suited for a header/footer I think. Anyway I think I have solved my own problem but I would really like to know why require_once() causes this to happen where as require() does not. Thanks again. EDIT: Perhaps I was wrong, it did seem like it was something to do with require_once() but now the page where I changed everything to require() is flashing again. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/73169-page-flashing/#findComment-369087 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.