Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Feature Discussion > Prevent caching
Powerwordhug (New Admin) 1/9/2011 4:51 AM EST : Prevent caching
Powerwordhug
Posts: 74
Posts With Wolves


When updating external scripts for such things as guild progress, if the file has the same name it will forever not update due to it being cached under the same name.


Is there a way I can get such things to update without having to clear saved data on my browser to see my website update?


A script that prevents caching of such files perhaps?  



Edit   wait this isn't a bug >.>  so sorry I don't know what this is ><     Halp ^^
TopBottom

Mottie (MVP) 1/9/2011 10:40 AM EST : RE: Prevent caching
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Powerwordhug!

To reload a page not using the browser cache, just hold down the Shift key and click the browser reload button.

Sometimes you may have to do it several times to get it to work.

If you have your own file in the file manager, then you can target that file specifically (usually works the first time you reload because you are targeting the file directly)
  • After uploading the file into the file manager, click the file name link!
  • The file opens in another tab/window.
  • Go to that tab/window, then hold down the Shift key and click the browser reload button.
TopBottom

Ansu (New Admin) 1/9/2011 11:08 PM EST : RE: Prevent caching
Ansu
Posts: 783
Zomgawsh Poster

A typical solution is to append "?version=x".  For example...

1.<link type="text/css" href="http://www.domain.com/style.css?version=1" />

Then, to force the browser to pull the latest copy after an update, just change your version number without any change to the filename.
Caching of your external css is preferable in live runtime (as opposed to testing/editing mode).  If your browsers are caching your scripts, it's reducing the load times on your pages and the bandwidth usage on your site.

If guildportal supported php, you could get even craftier with a timestamp like so...

1.<link type="text/css" href="style.css?<?php echo date('l jS \of F Y h:i:s A'); ?>" />
2. 
3.<!-- The above will output... -->
4.<link type="text/css" href="style.css?Sunday 9th of January 2011 11:04:21 PM" />

You might be able to find a javascript method of doing this, or you could try some sort of frankenstein ASP method (if GP allows it), since that seems to be what GP runs on.

Hope that helps.
TopBottom

Powerwordhug (New Admin) 1/10/2011 6:41 AM EST : RE: Prevent caching
Powerwordhug
Posts: 74
Posts With Wolves

Hrmmm lots to think about.


The occasion such things occur is when is say when I update my raid progress, no one see's the updated status until they all clear there chaches.  Telling everyone to do this defeats the purpose of something that essentially is a guild status.  So ill have to add the version number thing to make there browsers automatically update changes when I make them?



Yet another thing that was weird.   I removed all members from the site in order to have them all re applies the new recruiting method.  Again what I found was everyone being automatically signed in under there old sign in details but with no account?     Despite being removed from the site they had to manually log out before being able to click "Join"  Because there old details where still working despite being removed.  They then could click "join" and sign up again using the same details still or new ones.

Highly confusing.





Also offtopic, members uploading pictures to the gallery.  If it has the same name it overwrites and causes all sorts of trouble and lost files.  What can I do about this?  Surely I have missed some basic setting for such a standard issue.
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%