lundi 21 septembre 2015

Mobile chrome is caching my website JS, how to refresh it?

I have a website which is serving a JS file app-build4.js. I had started out with app-build1.js, then updated it to app-build2.js, then 3 and 4 in vain attempts to update the code for all my users. However, I still see a lot of users are getting the old version. As far as I can see, there is no caching on the file (but maybe I'm missing something.) How can I get this JS file to get refreshed for all my users? I also tried adding version numbers, like app-build1.js?v=2 but mobile browsers still seem to be caching the old version.

I have added the JS file's request headers in case there is something useful there.

Remote Address:216.58.220.44:443
Request URL:http://ift.tt/1gHoGJy
Request Method:GET
Status Code:200 OK
Response Headers
accept-ranges:bytes
cache-control:private,max-age=10
content-encoding:gzip
content-length:134949
content-type:application/javascript
date:Mon, 21 Sep 2015 19:02:20 GMT
etag:W/"93919-3531355858"
last-modified:Sat, 19 Sep 2015 08:39:13 GMT
server:GFE/2.0
status:200
vary:Accept-Encoding
via:1.1 Chrome-Compression-Proxy
x-original-content-length:153153
x-powered-by:Express
Request Headers
:authority:quizizz.com
:method:GET
:path:/js/app-build4.js
:scheme:http
accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
accept-encoding:gzip, deflate, sdch
accept-language:en-US,en;q=0.8
cache-control:no-cache
chrome-proxy:ps=1442859791-256149620-1168527570-3005197679, sid=44e302acca3e82c8385e5ed59b86f007, c=android, b=2454, p=94
cookie:__uvt=; __lc.visitor_id.5516731=S1438113482.b7bb7db5e3; __unam=b3785e0-14f879f3395-110b6e7b-1; pId=Deepak; _calq_d=eyJhY3RvciI6IjM4Y2YxZDQxLTdlYzEtNGJjNi04YWY3LWY2NmFjMzQzM2Q5YyIsImhhc0FjdGlvbiI6dHJ1ZSwiaXNBbm9uw3p0cnVlLCJhY3Rpb25HbG9iYWwiOnsiJGRldmljZV9hZ2VudCI6Ik1vemlsbGEvNS4wIChMaW51eDsgQW5kcm9psdfwAuMjsgWFQxMDMzIEJ1aWxeL0xYQjIyLjQ2LTI4KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvNDQuMC4yNDAzLjEzMyBNb2JpbGUgU2FmYXJpLzUzNy4zNiIsIiRkZXZpY2VfcmVzb2x1dGlvbiI6IjM2MHg2NDAifX0=; connect.sid=s%3AUWjntpwu9hxlTwIU-JUDb7ex1ELbXHXF.sRL3joQsStECOFXM3H22Gjm8wTz3hETvOKXSP3bcLFw; uvts=3JEGAqIroltEXRix; _gat=1; _ga=GA1.2.1978690983.1436952593
pragma:no-cache
referer:http://ift.tt/1gHoGJy
upgrade-insecure-requests:1
user-agent:Mozilla/5.0 (Linux; Android 5.0.2; XT1033 Build/LXB22.46-28) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.94 Mobile Safari/537.36

Another really weird thing is that app-build4.js seems to be returning a version which was never even in app-build4.js.




Aucun commentaire:

Enregistrer un commentaire