We help IT Professionals succeed at work.

How do I force a page refresh onload

DallySP
DallySP asked
on
Medium Priority
382 Views
Last Modified: 2012-05-06
I update a fashion site on a regular basis which involves changing flash elements, pics, copy and stylesheets for each page. How do I make sure that when the visitor looks at a page after an update the stylesheet and other elements are reloaded so the page doesn't look squiffy as it sometimes does.
Obviously by pressing F5 a few times it fixes the problem, but I need that to be automatic so people don't think the page is broken.
Comment
Watch Question

erikTsomikSystem Architect, CF programmer

Commented:
try this
<head>
<meta http-equiv="refresh" content="1" />
<head>

Author

Commented:
I've tried that, but it just keeps reloading the page every 1 second which looks a bit odd, is there not a function that makes sure that everything thats previsously chached gets replaced onload?
IT Consultant
Commented:
does your page include code to prevent the page from caching?
http://www.htmlgoodies.com/beyond/reference/article.php/3472881

Also - how frequent are these pages updated? daily? within minutes?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
No it doesn't, but that might be a solution. I'll have a read through the article. Its updated about once a month, so not that frequently.
Kiran Paul VJComputer Engineer
CERTIFIED EXPERT
Commented:

Author

Commented:
Thank you to both of you. I think I'll use this certainly on the home page.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.