if you can pack a minimalist app to reproduce I'll be happy to help.
On Thursday, August 30, 2012 10:23:36 PM UTC+2, Yarin wrote:
>
> I swear both the URL(..., vars=) and the non-serialized URLs both aren't
> working- I'm on 1.99.7, with the code in the right place in front
> of include web2py_ajax.html, together with all my other working scripts and
> styles. optimize_css is not enabled, and doesn't appear to be any sort of
> caching problem. Tested on chrome and safari. No clue..
>
> I'll have to test further on a new project and try to drill down into
> what's going on- will report back.
>
> @Rochacbruno, you said you ran into the same thing. Can you verify?
>
> On Thursday, August 30, 2012 4:10:51 PM UTC-4, Niphlod wrote:
>>
>> what version are you using ? both those notations should work ok (just
>> tested in latest trunk and 1.99.7)
>> Web2py does not have a problem with appended vars, it's only that if you
>> do URL('something', 'othersomething') othersomething is escaped
>> (correctly). Then response.include_files() tries to embed those in
>> web2py_ajax (at least in recent scaffolding apps) and it checks for the
>> file extension of the file to write the correct tags in the head.
>>
>> If the URL is generated with vars or if you append the path without using
>> the URL function it should be ok.
>>
>> Please check also that you have response.optimize_css & co. disabled:
>> they somewhat cache around your files for some time. That implementation is
>> buggy in my POV.
>>
>> On Thursday, August 30, 2012 9:38:51 PM UTC+2, Yarin wrote:
>>>
>>> So it seems like response.files has a problem with appended vars? Even
>>> when I spell out the URL entirely, it never gets output:
>>>
>>> response.files.append("/css/main.css?v=123") # Doesn't get output
>>> response.files.append("/css/main.css") # Does get output
>>>
>>> Assuming this is why rocha used html. Can we fix this at least?
>>>
>>> Niphlod- Cache-busting- cool, this is what we need. The
>>> folder-versioning is annoying to do manually for incremental updates, but
>>> if web2py could automate it would be slick. Per that implementation, let's
>>> have it as an adjustable setting (e.g. css_version_num) instead of
>>> completely randomized per rocha's solution- cache is useful, we just want
>>> to bust it when we have an update to roll (probably obvious)
>>>
>>>
>>>
>>> On Thursday, August 30, 2012 2:50:26 PM UTC-4, rochacbruno wrote:
>>>>
>>>>
>>>> I cant understand how versioned folders would help on this case? I ran
>>>> on to this issue a long time ago and I ended using pure html for this.
>>>>
>>>> <script src="{{=URL('static', 'js',
>>>> args='mylib.js')}}?{{=get_random_number()}}">
>>>>
>>>> This works for me when I need to bypass the cache to get the proper js
>>>> loaded on the client.
>>>>
>>>
--