blob: 34eff0263c95ae7751199ad9596c5b773e476731 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import random
import time
def main(request, response):
# no-cache itself to ensure the user agent finds a new version for each update.
headers = [(b'Cache-Control', b'no-cache, must-revalidate'),
(b'Pragma', b'no-cache')]
# Set a normal mimetype.
content_type = b'application/javascript'
headers.append((b'Content-Type', content_type))
# Return a different script for each access.
return headers, u'// %s %s' % (time.time(), random.random())
|