Forums / Templates, Stylesheets, Page Layout / Stylesheet does not load on first try, must refresh browser to bring up the styles

Stylesheet does not load on first try, must refresh browser to bring up the styles

Views: 2,147

Results 1 to 13 of 13
31 Aug 2012, 10:37 PM
#1
westdh avatar

westdh

New Zenner

Join Date:
Aug 2012
Location:
Medford Oregon USA
Posts:
44
Plugin Contributions:
0

Stylesheet does not load on first try, must refresh browser to bring up the styles

when I access this page directly from a browser it comes up just fine.

http://www.web-mobile-cart.com/dir/index.php?main_page=index&cPath=65

when I access this page from an another application it comes up, but without the stylesheet being applied. i need to click refresh in order to pickup the stylesheet. then it displays properly. ???

1 Sep 2012, 9:48 AM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

westdh:

when I access this page from an another application

Not sure what that means.

1 Sep 2012, 11:21 AM
#4
westdh avatar

westdh

New Zenner

Join Date:
Aug 2012
Location:
Medford Oregon USA
Posts:
44
Plugin Contributions:
0

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

I'll try walking thru the steps.

  1. enter this url: http://www.web-mobile-cart.com/proto-40a/
    You can make srink your screen down to 320px wide

then click on steps 2.
2. http://www.web-mobile-cart.com/dir/index.php?main_page=index&cPath=65
the first time it should bring up the page displayed properly.

  1. Click on the Logo or Home and you will return to a page saying "Thank You for using the shopping cart."
    if you are using a wide screen ... 'make it smaller in width' to see a side bar menu click on the 'shop' button.

  2. the url is pointing to http://web-mobile-cart.com/dir/

  3. click on the shop icon.

  4. you are now at the original html page. where we stated

  5. click on "View the Shopping Cart" For more Information.

  6. The url is:
    http://www.web-mobile-cart.com/dir/index.php?main_page=index&cPath=65
    which is the original url in step 2.

But the page does not display properly. Because of the missing stylesheet.

  1. refresh the page and it will then display correctly with the styles

--- Thats it why did the stylesheet not excute? the second time

also if you repeat these step the layout will not display correctly you have to refresh in order to see the layout correctly.

if you wait a long time before re-doing these step...I do not know how long.

It will work the first time again displaying correctly.

Hope this explains the problem.

1 Sep 2012, 9:07 PM
#5
westdh avatar

westdh

New Zenner

Join Date:
Aug 2012
Location:
Medford Oregon USA
Posts:
44
Plugin Contributions:
0

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

Please close this request found the answer. re-did the path in the tmp_header.php

4 Sep 2012, 2:47 PM
#6
westdh avatar

westdh

New Zenner

Join Date:
Aug 2012
Location:
Medford Oregon USA
Posts:
44
Plugin Contributions:
0

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

i have this strange problem when I first bring up the site the stylesheet does not come up at first,
the page loads without the styles, I then must refresh the browser, this loads the stylesheet and everything is ok. I can then step throughout the sites pages with no problem. but if I click on the home button or the logo I leave the cart and go to another subdomain. If at a point in time i return to Zen Cart it displays the page without the stylesheet applied. Then I refresh the browser an everything is ok and i can progress throughout the carts pages with no problem; not until I leave the cart and go to another directory. It seems to be intermittent depends on the time in which I am away from the cart. If I return to the cart right away the stylesheet comes up with the page and everting is ok. I seems that the time I am away from the Cart is time dependent. Is this a cache problem or what.

14 Sep 2012, 11:18 PM
#7
westdh avatar

westdh

New Zenner

Join Date:
Aug 2012
Location:
Medford Oregon USA
Posts:
44
Plugin Contributions:
0

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

When i first enter a link to Zen-Cart App form another sites submitted URL the page comes up styled correctly.

These steps work correctly on the first sequence of the 3 steps.

  1. Enter this url. http://web-mobile-cart.com/fbprojectA/index.html
  2. Then click on Prices tab.
  3. Then click on Place Order: to excute this url.

http://web-mobile-cart.com/dir/index.php?main_page=quick_order&action=add_products&model_1=Recycled+Water+Markets&qty_1=1

  1. The page is displayed properly. Now click on the Home Tab this takes you back to my site.

Now try doing these steps again

  1. click on Prices tab.
  2. Then click on Place Order: this excutes the same url as before.

http://web-mobile-cart.com/dir/index.php?main_page=quick_order&action=add_products&model_1=Recycled+Water+Markets&qty_1=1

  1. This takes you back to the cart. But the page is not styled.

  2. Click on browser refresh and the file displays correctly.

why arn't the styles called ahead of the page??

you can keep cycling an this will keep happening until quit for for a long period.

15 Sep 2012, 5:56 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

I don't seem to have any stylesheet loading problems when accessing your site.
But I do have another problem: the "prices" tab you mention, it doesn't show up for me.

I think many of your problems are related to the fact that half of your site is completely outside of Zen Cart, in static .html files.
The rest of your problems are almost certainly related to the vast number of changes you've made to the way Zen Cart normally works. It's nearly impossible for us to tell you what to "fix" when your code isn't much like original Zen Cart code anymore.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Sep 2012, 6:14 PM
#9
westdh avatar

westdh

New Zenner

Join Date:
Aug 2012
Location:
Medford Oregon USA
Posts:
44
Plugin Contributions:
0

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

I am sorry that the problem was stated incorrectly.. If you have read on. You wil find correction to the the original post. It is not the first try. Read down the list of comments and you will find test sequence that explains that it the second sequence and beyond that the CSS does not load until refreshed.

15 Sep 2012, 6:36 PM
#10
westdh avatar

westdh

New Zenner

Join Date:
Aug 2012
Location:
Medford Oregon USA
Posts:
44
Plugin Contributions:
0

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

I do not understand if you followed my sequence where it worked on the first try and you click on the price tab on the menu on the left side starting from this url: http://web-mobile-cart.com/fbprojectA/index.html. "i see the problem" you need to shrink the browser to the left this is a phone app width 320px. now you should be able to cycle thru the second time and see that the stye sheet is not excuted until refreshed.

15 Sep 2012, 6:46 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

westdh:

These steps work correctly on the first sequence of the 3 steps.

  1. Enter this url. http://web-mobile-cart.com/fbprojectA/index.html

  2. Then click on Prices tab.I don't see a Prices tab.
    westdh:

  3. Then click on Place Order: to excute this url.

http://web-mobile-cart.com/dir/index.php?main_page=quick_order&action=add_products&model_1=Recycled+Water+Markets&qty_1=1
4. The page is displayed properly.When I click that link I get a properly styled shopping cart page.
(Albeit hugely enlarged with humongous buttons and pixelated graphics.)
westdh:

Now click on the Home Tab this takes you back to my site.That's a peculiar choice, which most shoppers wouldn't do.
But, yes, clicking Home takes me back to your NON-zen-cart page.
westdh:

Now try doing these steps again

  1. click on Prices tab.Again, I don't see one.
    westdh:

  2. Then click on Place Order: this excutes the same url as before.

http://web-mobile-cart.com/dir/index.php?main_page=quick_order&action=add_products&model_1=Recycled+Water+Markets&qty_1=1Pasting that link into my browser takes me to the shopping cart page. Correctly styled. (still with same huge pixelated buttons)
westdh:

  1. This takes you back to the cart. But the page is not styled.Like I said, I don't see that problem.
    westdh:

  2. Click on browser refresh and the file displays correctly.Not necessary here.
    westdh:

why arn't the styles called ahead of the page??Must be something in your browser.
westdh:

you can keep cycling an this will keep happening until quit for for a long period.Can't replicate it.

And ... why are you forcing local storage to my browser? What purpose does that serve?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Sep 2012, 6:49 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

Okay, resizing to 320px does show me the prices tab.

Still no problems getting the shopping cart page to appear and load its stylesheet. No refresh required.

Must be caching problems in your browser.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Sep 2012, 8:12 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Stylesheet does not load on first try, must refresh browser to bring up the styles

I tried a few other things, and have been able to see the problem you're describing.

It's caused by your javascripts. If I tell my browser to ignore javascripts, and then scroll down your HTML page to the prices links and click one, it loads the store with the stylesheet immediately. Never any need to refresh.
Looks like your javascript is interfering with normal page loading, causing the next page to NOT actually load at all (judging from the browser Inspector), until you do an explicit refresh.

Start by removing all your javascript, and then add things back one by one, keeping only the essentials, until it breaks. Then you'll know specifically what's causing it.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.