[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Force page redownload

Posted on 2007-08-09
13
Medium Priority
?
267 Views
Last Modified: 2013-11-05
Hi. I have a site and the pages aren't being reloaded.

http://www.somedomain.com

will load an old version of http://www.somedomain.com/index.html

I can get the new one if I specifically state the "index.html" portion.

How can I force redownload of new version of index.html so that when my visitors visit http://www.somedomain.com/ they won't get the old index.html file?

Thanks
0
Comment
Question by:TonyTone1
  • 6
  • 5
  • 2
13 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 19664128
Put in Your .htaccess in documentRoot

ExpiresDefault "access plus 1 second"
#refer http://httpd.apache.org/docs/2.0/mod/mod_expires.html

If the module is unavailable, try
Header set Cache-Control "no-cache, must-revalidate"
Header set  Expires "Mon, 26 Jul 1997 05:00:00 GMT"
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 19664131
0
 
LVL 6

Expert Comment

by:gjutras
ID: 19664134
if it's a cacheing issue there's nothing you can do except for going forward in pages you don't want cached put
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
in the head tag.
If it's a web server setup you can control and it is different files, change the order of importance of files to server and move index.html higher than the others.
If you don't have control, change the file that is loading to be <html><head></head><body onLoad="window.location='newurl'"></body></html>
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Author Comment

by:TonyTone1
ID: 19664230
ravenpl, it gives me an error if i put that in .htaccess

.htaccess: ExpiresDefault not allowed here
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 19664282
You need to be allowed o override Indexes option
Add to Your httpd.conf file(somewhere at the end) and restart apache
<Directory /path/to/docroot>
 AllowOverride +Indexes
</Directory>
0
 

Author Comment

by:TonyTone1
ID: 19664670
Hi I've tested these solutions and they will work for users who are new visitors to the site but this won't help those who have their browsers caching the page. Any ideas as to how to force those visitors to redownload?
0
 

Author Comment

by:TonyTone1
ID: 19664793
I guess the main issue here is that firefox (what my visitors use) is caching hard. when going to http://mydomain.com/

and inspecting the headers with firebug the last modified date is NOT the correct one. yet when I do a request through telnet mydomain.com 80 the proper last headers appear.

how do we get around this?
0
 

Author Comment

by:TonyTone1
ID: 19664800
i've even deleted the document root's index.html file and it still uses the browser cached one.
0
 
LVL 6

Expert Comment

by:gjutras
ID: 19664920
you can add the expire information,
change the file name from index.html to another that works on your web server (index.htm or default.htm) as a root file.  Then the page will have to be loaded and the clients will recieve the new no-cache expire information.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 19664926
You will do nothing on the server side. It's strictly web browsers issue. Ask them to reload.
0
 

Author Comment

by:TonyTone1
ID: 19705412
giutars, tried all that no luck.

ravenpl
Asking thousands of people to reload isn't really doable. besides all I hear is that my client's visitors are having trouble with the page (since it's not reloading).

Oh the other thing, index.html is a redirect. The old version redirected to a certain location, now the new version redirects to another. The old location still applies for people who have the page cached. and no they won't even be able to hit reload browser side since it redirects so fast.
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 1500 total points
ID: 19705731
TonyTone1: once browser cached the content and thinks it's still valid, You will not fix it on server side. Sorry.
Hence
- puting <meta http-equiv... in the html itself will not work for already cached page. Server will not parse the served html(php or whatever) and will not send the headers.
- have You tried header module with the must-revalidate option? must-revalidate is Your last chance.
0
 

Author Comment

by:TonyTone1
ID: 19730100
I tried must-revalidate. No luck. oh well. No solution I guess...
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question