On Tue, Oct 1, 2013 at 9:23 AM, Bill Freeman <[email protected]> wrote:

> While the browser may cache this stuff, images too, from the browser's
> point of view, if you are on a different page, you don't have access to
> stuff the login page loads.
>

Ah, thanks. I did not know that. I put back the js and css references into
the individual templates and it's working now. I verified in the Chrome
debugger that they are being loaded from the cache.


>
> What does help is to always use exactly the same URL for the static media,
> in which case when a page calls it out, the browser can realize it has that
> CSS, JS, etc, cached, rather than downloading it again.
>
>
> On Tue, Oct 1, 2013 at 11:08 AM, Larry Martell <[email protected]>wrote:
>
>> I would like to load all the javascript and css files that my app needs
>> when the user logs in. So I added lines like this to my login.html:
>>
>> <link rel="stylesheet" href="/static/style/tablesorter.css"
>> type="text/css" />
>>
>> <script src="/static/scripts/jqplot/jquery.jqplot.js"
>> type="text/javascript" ></script>
>>
>> But when I go the pages that need these (that used to include them in
>> their templates), they don't seem to be available. I don't get any errors,
>> but it's clear that the js is not running and styles are not being applied.
>> Am i doing something wrong? How I can load everything at login time?
>>
>> TIA!
>> -larry
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CACwCsY5SguJjgvP%2Bw%3DQu4vi1zNkB%2BnSiKaNAw_FeCUbSr%3Dm_RQ%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAB%2BAj0u5EQvg60bBmUZ59T%2BVzv5joa3McSa34Ec8ckL69A3kHQ%40mail.gmail.com
> .
> For more options, visit 
> https://groups.google.com/groups/opt_ou<https://groups.google.com/groups/opt_out>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY7DKPUp6BGSEG-NA4Cm7Pbj9y__tfrXhRptoP%2BEOuLgOw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to