?
Solved

way to code for website or webpage to auto refresh without having to refresh? maybe htaccess

Posted on 2013-05-20
8
Medium Priority
?
875 Views
Last Modified: 2013-05-24
i am updating webpages daily and my clients have to hit refresh to see the changes.
is there a way to auto refresh each time something is changed so that

when a user opens up the page, even if visited earlier that day, that it will refresh
with out having to click on refresh?

i have htaccess in place, but that does not help it.
maybe i have the wrong htaccess code.

thanks
0
Comment
Question by:webdott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 14

Expert Comment

by:quizwedge
ID: 39182567
While this one auto refresh on the page being changed, it will auto refresh the page every X seconds. See the second example at http://www.quackit.com/javascript/javascript_refresh_page.cfm
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39182628
The only way to make sure the page is current to stop it from being cached.  But when you stop it from being cached, it slows down browsing because the browser has to go back to the server for everything.  And 'htaccess' won't help because the browser may check the 'If Not Changed' status but 'htaccess' has nothing to do with that.

Info about cache parameters here: http://php.net/manual/en/function.header.php
0
 

Author Comment

by:webdott
ID: 39182630
thanks, but this will be annoying to the end user.

i may not have asked properly.

i have pictures and text, almost like a blog, on webpages that i change daily.
if a end user visited that page at 9:00am
i changed something at 10:00am
and they view it again at 11:00am, they will not see my changes unless they refresh the page

this deals with the browser cache of the webpage, i think it has something to do with the
Expiresby - timing in the htaccess code
i want it to show the updated info on the webpage just like blogs do, say in wordpress

thanks
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 39182649
Try the meta-expires tag.  This works for me.  Put it in the document header.

<META http-equiv="Expires" content="Mon, 01 Jan 1990 01:00:00 GMT" />
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39182695
We understand very well what you are talking about because we are developers too and always have to deal with this.  Wordpress and other CMS's are not static pages in the first place, they are database driven.  Everytime you access a Wordpress site, it gets the content from the database and builds a new page.

I just was looking at my Wordpress blog to check the headers and when I went back to my home page, it didn't even make a request, just displayed it from cache.
0
 
LVL 14

Expert Comment

by:quizwedge
ID: 39182705
In that case Ray_Paseur's comment should work. May also want to check into pragma no-cache http://www.i18nguy.com/markup/metatags.html
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39182708
The other thing you can do is render the web page entirely with JavaScript.  The JS will use AJAX calls to your server-side scripts and replace DIVs in the HTML document.  Then, even if the web page document is cached, the AJAX calls will still run and the fresh content will arrive.
0
 

Author Closing Comment

by:webdott
ID: 39195526
thanks
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will learn how to count occurrences of each item in an array.
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

777 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