Force refresh of browser

This is a discussion on "Force refresh of browser" within the Web Page Design section. This forum, and the thread "Force refresh of browser are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Feb 4th, 2007, 00:02
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Force refresh of browser

Do any of you know of a way to force refresh of the browser everytime a site is visited? I know there are java scripts but was not sure if that was best way to acheive this...
Sorry if this is the wrong forum for this post...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Feb 4th, 2007, 02:55
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Why would you want to do such a thing?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Feb 4th, 2007, 12:48
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

A client has requested this. She is planning on updating the site a lot. She wants to make sure the latest changes are seen each time a visitor visits her site. I told her it was unlikely that we could do this, but in fairness to her, I thought I'd research it a bit.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Feb 4th, 2007, 22:52
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

What is she wanting to update? Text is never cached, but images and other external files are. If she has PHP, I believe you can do something like this to get linked files to reload every time:

Code: Select all
<link rel="stylesheet" href="/layout.css?<?php echo time(); ?>" type="text/css" media="screen" />
The output would be something like this:

Code: Select all
<link rel="stylesheet" href="/layout.css?1170633048" type="text/css" media="screen" />
I've done that with images before.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Feb 4th, 2007, 23:41
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Well I appreciate the effort Ryan but I'm not versed in php at all and that just looks like mumbo jumbo to me.

This is a photography website so having people see the latest was important to her. After seeing that code, I'm going to tell her it "can't" be done... by me!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Feb 5th, 2007, 00:38
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Haha, it's not difficult. Just stick ?<?php echo time(); ?> after the extension of a file. For example:

Code: Select all
<img src="image.gif?<?php echo time(); ?>" />
You need to change a page's extension, as well.

index.html to index.php and so on.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Feb 5th, 2007, 00:40
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Oh I can do that!!!!!!! Yippeee...........................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Feb 5th, 2007, 00:46
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Let me know if it works
If it doesn't, I'll dig out my backups and find where I used it correctly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Feb 5th, 2007, 00:51
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Will do!! Thanks ....

btw... made a gorgeous site this week and it's xhtml strict! wahoooo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Feb 5th, 2007, 02:43
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Haha, congratulations Gonna post it up in the critique forum?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Feb 5th, 2007, 12:57
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

I doubt it! hahahahaha If the client is happy and I'm happy, I don't want to mess with it!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Feb 5th, 2007, 21:43
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Well I can at least comment on the code. PM me if you'd like that but don't want the rest of the members picking your brain
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Feb 6th, 2007, 17:36
Reputable Member
Join Date: Dec 2005
Location: Texas
Age: 19
Posts: 328
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Aww Rian share the wealth man! Your no fun. I like picking at peoples brains because they pick at mine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Feb 6th, 2007, 18:38
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

hahahah Daygon... you're the one I'm most afraid of! hahahahahah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old Feb 6th, 2007, 18:47
Reputable Member
Join Date: Dec 2005
Location: Texas
Age: 19
Posts: 328
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Im offended. Sikes. I'll be gentle i promise.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old Feb 6th, 2007, 18:49
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Force refresh of browser

Ok.. I might do it this weekend... I'm still waiting for homepage text...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
browser, refresh

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop the browser refresh on clicking the webbrowser's refresh button ? camarun20 JavaScript Forum 3 Mar 18th, 2008 23:04
Can I force IE to open img at actual size? billysalisbury PHP Forum 11 Oct 26th, 2007 16:16
Error on Browser refresh HallmanBilly Flash & Multimedia Forum 0 Sep 9th, 2007 19:48
How to force table cell widths AdRock Web Page Design 1 Sep 7th, 2006 14:54


All times are GMT. The time now is 11:53.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42