Be Excellent To Each Other

And, you know, party on. Dude.

All times are UTC [ DST ]




Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Forcing http load, ignore the cache
PostPosted: Sat Jan 22, 2011 23:43 
SupaMod
User avatar
Est. 1978

Joined: 27th Mar, 2008
Posts: 69782
Location: Your Mum
Okay, so, loads of people are playing Space Cows now thanks to B3ta, and I'm keeping on top of the bug reports.

However, whenever I change the JS, I need to find a way to force people's browsers to reload the new AH CHRIST OF COURSE I KNOW HOW OKAY TA

_________________
Grim... wrote:
I wish Craster had left some girls for the rest of us.


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sat Jan 22, 2011 23:50 
User avatar
Bouncing Hedgehog

Joined: 27th Mar, 2008
Posts: 26234
Glad I could help.

Anything else, let me know.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sat Jan 22, 2011 23:54 
User avatar
Excellent Member

Joined: 30th Mar, 2008
Posts: 5924
Location: Stockport - The Jewel in the Ring
Yeah, can't believe you missed it.

_________________
Mint To Be Stationery - Looking for a Secret Santa gift? Try our online shops at Mint To Be.

Book me in the Face | Tweet me. Tweet me like a British nanny.


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sat Jan 22, 2011 23:59 
SupaMod
User avatar
"Praisebot"

Joined: 30th Mar, 2008
Posts: 17114
Location: Parts unknown
Worst.. thread... ever.


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sun Jan 23, 2011 0:07 
User avatar

Joined: 12th Apr, 2008
Posts: 17989
Location: Oxfordshire
Did he flash the BIOS?


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sun Jan 23, 2011 1:03 
User avatar
Unpossible!

Joined: 27th Jun, 2008
Posts: 38709
<belm>


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sun Jan 23, 2011 2:15 
User avatar
Part physicist, part WARLORD

Joined: 2nd Apr, 2008
Posts: 13421
Location: Chester, UK
What was the answer? Timestamps?


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sun Jan 23, 2011 2:42 
SupaMod
User avatar
Est. 1978

Joined: 27th Mar, 2008
Posts: 69782
Location: Your Mum
Malaboob wrote:
What was the answer? Timestamps?

No, have php add the revision number on as a url parameter on the end of any external files, for example
Code:
<script type="text/javascript" src="myjavascriptfile.js?rev=00005" />

Then, when the version number changes, all the JS files are considered "new" by the browser, but will still be cached aggressively (which is what I want, the actual game screen has 368.4KB of external scripts :S).

TheVision wrote:
Worst.. thread... ever.

Yeah, that's fair enough :)

_________________
Grim... wrote:
I wish Craster had left some girls for the rest of us.


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sun Jan 23, 2011 8:41 
SupaMod
User avatar
Est. 1978

Joined: 27th Mar, 2008
Posts: 69782
Location: Your Mum
Cor, quiet last night.

_________________
Grim... wrote:
I wish Craster had left some girls for the rest of us.


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sun Jan 23, 2011 11:47 
User avatar
Part physicist, part WARLORD

Joined: 2nd Apr, 2008
Posts: 13421
Location: Chester, UK
Grim... wrote:
No, have php add the revision number on as a url parameter on the end of any external files, for example <script type="text/javascript" src="myjavascriptfile.js?rev=00005" />
Then, when the version number changes, all the JS files are considered "new" by the browser, but will still be cached aggressively (which is what I want, the actual game screen has 368.4KB of external scripts :S).


Ah, yes. Timestamps (added in the same fashion) would obviously eliminate caching entirely.


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sun Jan 23, 2011 16:40 
User avatar

Joined: 30th Mar, 2008
Posts: 32624
Grim... wrote:
No, have php add the revision number on as a url parameter on the end of any external files
You aren't supposed to have to do this; ETags are supposed to allow the web browser to probe whether cached content is valid or not in an efficient manner. I'm not sure why this wouldn't be working for you though.


Top
 Profile  
 
 Post subject: Re: Forcing http load, ignore the cache
PostPosted: Sun Jan 23, 2011 21:27 
SupaMod
User avatar
Est. 1978

Joined: 27th Mar, 2008
Posts: 69782
Location: Your Mum
See, I have never been able to get ETags to work reliably, despite Y!Slow raving about them.

_________________
Grim... wrote:
I wish Craster had left some girls for the rest of us.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Columbo, Satsuma and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search within this thread:
You are using the 'Ted' forum. Bill doesn't really exist any more. Bogus!
Want to help out with the hosting / advertising costs? That's very nice of you.
Are you on a mobile phone? Try http://beex.co.uk/m/
RIP, Owen. RIP, MrC. RIP, Dimmers.

Powered by a very Grim... version of phpBB © 2000, 2002, 2005, 2007 phpBB Group.