Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page is caching. How can I make it stop?

Status
Not open for further replies.

THE4MAN

Technical User
Joined
Mar 17, 2002
Messages
73
Location
US
I posted this in the website designer's forum but I thought somebody here might be able to help as well.

I have a page that when it loads, it produces those nasty and unwanted scroll bars. They only scroll about 7-10 pixels of blank space. If I hit the refresh button on the browser, they disappear. This problem goes away if viewed at higher than 800x600 but this is the resolution I designed the page at and since a good majority of viewers use 800x600, this is a problem that needs to be resolved.

I searched the archives and found that the following command placed in the header is supposed to keep the page from caching. <META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>

This doesn't do the trick - the scroll bars still appear on each visit.

The fact that hitting the refresh button clears the scroll bars indicates that this is a page caching issue, right?

Can anyone help me out here? I just want the page to load cleanly each time, without the scroll bars. This is the page in question if anyone wants to check it out...

Thanks in advance for any help.

Dave Fore
 
I think the you have this problem because of layers. There is nothing with page caching...

By the way, if found an answer please post it here so others may know it as well. Good Luck! :-)
 
Your width of the main table is 780, which is far too much for an 800 x 600 resolution. You should be pitching for around the 720, 730 mark to get it to fit on the page. Remember, the screen resolution does not mean that you can fit that many pixels on the screen, you have to allow for browser toolbars, borders etc. Derren
[Mediocre talent - spread really thin]
 
Thanks for the response Derren.

I think it's not even a page caching problem to be honest. I have a feeling it's an IE issue and here's why...

Hitting the &quot;refresh&quot; button gets rid of the scroll bars and the gap, leaving a nice clean page the way I want it. Also, if I make this &quot;problematic&quot; page my default home page in IE, it loads without the gap or scroll bars, nice and clean. In Netscape 4.5 and 6.22 these problems do not manifest themselves whatsoever.

I also found a little page sizing javascript that eliminates this problem as well. Same exact same page layout with just the addition of the script and the scroll bars and gap are gone (looks just like hitting the refresh button). Remove the javascript, the bars and gap come back.

I tried an experiment with a blank page and inserted a simple 100% width table. IE produces a gap unless you hit refresh or add the javascript. I've seen this problem at home and at work so it's been tested on at least 4 different systems using IE5, 5.5 and 6 with the same result.

So with the &quot;evidence&quot; presented above, do you find Internet Explorer to be guilty?

Dave Fore
 
Hi Dave!

When I insert 100% width table and preview it with IE it never produses any gap! For sure! There could be some other problem - browser or its version or anything else... Good Luck! :-)
 
I don't htink it's a caching problem, since I have a similar problem, and I use the &quot;pragma no cache&quot; command.

My problem only occurs on ie5.5, it doesn't appear on 4 or 5.0 : When I open a page, I get about an extra 10 pixels width on the page. If I refresh, the extra 10 pixels disappear.

If you found a solution to the problem, please let me know!!!
 
IE5.5 and above are the guilty party.

For interest, here's the code I used to fix it:

<SCRIPT LANGUAGE=&quot;javascript&quot;>
var width = screen.width
var height = screen.height
window.resizeTo(width,height);
</SCRIPT>

On a similar theme, I noticed another incompatibality with version 5.0 and those higher:

I have 2 layers on my screen, both include a table with the exact same layout, both have auto scroll on.

When the top layer only has one or 2 rows in, and the scroll bar doesn't appear, IE5 manages to line up the table with the layer below, which does have a scroll bar. However IE5.5 stretches the table in the top layer to fill the space that the scroll bar would have taken, so all the columns are out of line with the table in the layer below!

Any solutions? <a href= wars Collecting UK</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top