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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page is still caching. How can I make it stop? 1

Status
Not open for further replies.

THE4MAN

Technical User
Mar 17, 2002
73
0
0
US
I had searched for and found a previous post to try and remedy the problem of page caching and then not displaying correctly on subsequent visits.

<META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;> appears to be the correct fix for this problem so I inserted this into my header on the following page...
But each time I visit this page, those nasty little scroll bars appear. The only way to get rid of them is to hit &quot;refresh&quot; in the browser and then all is fine again.

Could someone look at this page and tell me what I can do so that it doesn't cache? I just want the page to display cleanly on each visit wihtout any scroll bars.

Thanks in advance for the help.

Dave Fore
 
I didn't get any scroll bars. Dunno if its worth mentioning but I'm running at 1152x864 resolution...

Rgds
 
Yeah, the higher resolutions don't exhibit the problem. All the computers here at work set to 800x600 exhibit this problem. But hit refresh and the scroll bars vanish. This is really frustrating.

Dave Fore
 
Hi mate,

The fact that the browser is caching these files should not make the slightest bit of difference with the scrollbars..

If you want to do this the best way, contact your host and ask them to set this up on the server side..

What type of server are you running on??

Hope this helps Wullie

 
Hey Wullie.

From what I can tell, my host is using:
Apache Version 1.3.20
Linux Redhat Version 6.2 (Manhattan)

I don't think I fully understand what's going on here. Are you saying that my design is fine and that my host's server is causing those scroll bars to appear and that there isn't anything I can do on my end to prevent it?

Also I don't have a clue as to what to ask my hosting provider to do to accomodate my needs here. Is there something specific I should be asking for them to do to facilitate this change? Is there something I can do myself in the control panel they provide for my site to make things right?

I'm confused!

Thanks a lot for the help.

Dave Fore
 
Hi mate,

What I mean't was that the cache should not affect your page.. There is probably another problem somewhere.

But, if you want to stop the page from being cached, then there are a few ways that you can get round this on the server side.

Can you use htaccess files?

Hope this helps Wullie

 
Hi mate,

One other thing,

You are highly running the risk of being banned from nearly every search engine out there.. You have BAKERSFIELD 16 times in your keywords... There are also a few other words.. That is automatic blacklisting in a lot of the engines..

Also you do not have a description tag, Why??

Hope this helps Wullie

 
Well for the keyword thing I used a program called Good Key Words. It primarily searches Overture.com and returns a &quot;score&quot; of what the most popular search terms are for a given &quot;field&quot;. In this case, my client is a realtor from Bakersfield. Bakersfield Real Estate is the number one search term used when people are looking for houses in this area. According to the program, Real Estate Bakersfield is number two, Bakersfield home is number 3, etc., so I went down the list and included each of the specific search terms that came up in the program's list and added them to my keyword list. This is the first site I have built so it didn't even cross my mind that I was doing something wrong here. I just put all of the most popular search terms on the list.

As far as a description tag, I don't even know what one is to know that I am missing one. And to be honest, I wouldn't know where or why to place one.

You guys are the experts here. I'm just fumbling along and trying to make a go of it. I appreciate you pointing out the errors. If you would be so kind as to suggest how to correct them, I would be most grateful.

Thanks so much for your help.

Dave Fore
 
Hi mate,

At the very minimum you should have the following:

<title>This is a short and to the point title.</title>

<META NAME=&quot;KEYWORDS&quot; CONTENT=&quot;This, is, a, list, of, keywords, that, I, want, people, to, find, my, site, by, using&quot;>

You can also include phrases in the keywords but do not use the same word more than about 3 times as a genral rule. So for a phrase you could have &quot;my phrase, another phrase, keyword, another&quot; etc..

Description goes in your head tag along with the keywords and title.

<META NAME=&quot;DESCRIPTION&quot; CONTENT=&quot;This is a description of the site that I want the world to know about.&quot;>


Now, in a search engine, your results look like this.


This is my title that I used on the page
This is the description that I gave on the page.


Your keywords are never seen by the browser and most engines do not even check for them but they are still worth having for the ones that do..

Hope this helps Wullie

 
Thanks a lot for the help there. I would not have known and would have ended up posting a search engine problem question here in about 3 weeks!

As for the original problem though, I uploaded the same page to a different server and am getting the same thing. Those scroll bars appear when the page loads and they disappear when I hit &quot;refresh&quot;. What's also interesting is that if I make the page the default home page for my browser, when it loads, the scroll bars don't appear. If I go to the next page and hit the &quot;back&quot; button, they reappear. Hit refresh and gone again.

I don't have access to any htaccess files. What can I tell my host to help correct the problem? Are they going to just tell me it's a design issue on my end and there's nothing they can do? I really hate to think that I'm going to have to move my content further up and further in to overcome this problem because it's not going to look as clean and not going to look like I want it.

Any more advice on this one?

Thanks so much for your time.

Dave Fore
 
Hi mate,

The following are what they can change on their side. This will only work if they have Mod_Proxy enabled...

CacheSize 5
CacheGcInterval 4
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
NoCache yourdomain.com

Don't tell them the real reason why you want this just tell them that you do not want any cache to be stored of your domain..

A sample mail could be:

..................

Dear host,

I am experiencing severe problems when trying to force a browser not to cache pages from my domain due to bugs in various browsers.

If you have Mod_Proxy enabled then would it be possible for you to set up in the httpd.conf so that my domain content will not be cached.

...............

But, I am still 99.9% that this is not the problem.... LOL

Hope this helps Wullie

 
I see where you are going there. But then that would apply to all of the pages on my site and with the same 34K background gif on most of the pages, I sure need to have *that one* stay in memory as the visitors browse around!

I'm just scratching my head on what could be wrong here.

Is there any kind of workaround that you can think of? Maybe some kind of javascript that sizes the browser window to fit only the content that I want to show and exclude scroll bars? Can you even do that on your index page?

I'm sure game to try anything here!

Dave Fore
 
Hi mate,

Give me some time with this...

I have just thought about this more and stopping the page from caching will likely make things worse.. At present, when the refresh is clicked, then you are loading it from the cache therefor if you stop this, the refresh button will probably not make the scrollbars go away..

I am not guaranteeing a solution just now as it is 4:50am and I need sleep!! I will work on it for another 20 minutes or so...

Hope this helps Wullie

 
Hi mate,

I am pretty sure that the following is the cause of this..

<td bgcolor=&quot;#FFFFFF&quot; width=&quot;48%&quot; height=&quot;174&quot;><object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;550&quot; height=&quot;140&quot;>

Width=&quot;550&quot; is more than 48%...

You are breaking the table format and forcing it to expand..

Let me know if this fixes it..

Hope this helps Wullie

 
Thanks for the tip Wullie. I tried it but with no success. I tried making the 48%, 100%. I tried making it 10%. Same result. I tried changing it to 550 px. I tried 100 pixels and 2000 pixels. Same result. Didn't make any difference what I changed it to.

Here's an interesting twist... I decided to start over and wipe out the page completely. Inserting only a single table with 2 columns. Table set to 100% width. No cell pad or space. All page margins set to zero. I colored each column a different background color. Nothing more on the simplistic page than this table.

When I preview it, the table falls short of covering 100% of the page by about 12 pixels. It leaves this gap along the right hand side. Hit &quot;refresh&quot; and the table expands fully to 100% covering the entire width of the page. Go to another page and then hit the back button, the gap is back. Hit refresh, the gap is gone. The page is here if you want to see... . Of course if I try and put the flash animation back in there and some text in the cell on the right, I'm back to the same problem. I either have a gap on the right, or I have the scroll bars. It's one or the other. Well actually, 771 pixels wide is the magic point where both a scroll bar and the gap are simultaneuosly displayed.

Netscape 4.5 and 6.22 don't exhibit this behavior for the gap *or* the scroll bars whatsoever so I am beginning to believe that Internet Explorer is somehow at fault here.

I can't begin to describe how much this is upsetting me. You have been really helpful in trying to resolve this problem. I just can't figure out what in the heck I could be doing wrong.

Anyone care to give this a shot?

Thanks for the help!

Dave Fore
 
I'll be DAMNED!!!

I think I just found a simple little script that takes care of this problem. I found it in another post by xutopia on thread253-263983.

Here it is:
<script>
window.resizeTo(screen.availWidth, screen.availHeight)
</script>

I tried it and it WORKS! Have a look...
(the old)
(the new)

I'm impressed. So simple, yet so effective.

Thanks to Wullie for all the help and extra effort and thanks to xutopia for an unrelated post I came across!

Dave Fore
 
I just checked it both at home and work. The old version gives me scroll bars. The new one doesn't.

Are you telling me that both versions still give you the scroll bars?

Let's assume for a moment that this is the case. So then, why? Did you look at the page I created with the simple 100% width table? It leaves a gap at the right unless you hit refresh. You can't get any simpler than this on design. No tricky code. No scripts. No CSS. It's just a single table set to display at 100% and yet it doesn't. Not in IE anyway. I even tried that little script on *that* page and when checked on my system and the one at work, the gap is gone. If I try to use pixels instead of percentages, I get either the scroll bars, the gap or both! But when I put in that script, the problem seems to have gone away.

What's could be going on here?

Dave Fore
 
Thanks brother!

You made my day!

BTW, do you think this is an IE problem since it didn't appear in either of the Netscape versions I tested it on? And since the overly simplistic page checked with the 100% width table exhbited this problem only in IE?

Dave Fore
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top