|
|
#1 |
|
New Member
![]() Join Date: Feb 2011
Posts: 4
|
Hello,
I have a site with several banners and backgrounds that I update each week. They are all just standard JPG images. The problem is that when I update them and go to the site to see them I have to refresh the page. How can I get it so that the new images load just by visiting the site? Please help. Thank you. |
|
|
|
|
|
#2 |
|
Gold Member
![]() Join Date: Feb 2011
Location: Australia
Posts: 369
|
Depending on the language you are using you can assign a random value to the images. So individual browsers think they are new images that need to be loaded.
PHP Example: Code:
<img src="img.jpg?rand=<?=rand(1,1000);?>" /> Code:
<img src="img.jpg?rand=<%=now()%>" /> |
|
|
|
|
|
#3 |
|
New Member
![]() Join Date: Feb 2011
Posts: 4
|
im using php
|
|
|
|
|
|
#4 |
|
New Member
![]() Join Date: Feb 2011
Posts: 4
|
that can't be used for the background though right?
|
|
|
|
|
|
#5 |
|
Gold Member
![]() Join Date: Feb 2011
Location: Australia
Posts: 369
|
I don't see why not. Give it a shot and report back.
|
|
|
|
![]() |
| Tags |
| banner, html, images, web |
| Thread Tools | |
| Display Modes | |
|
|