/
best-practices.txt
35 lines (24 loc) · 1.12 KB
/
best-practices.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.. _topics-best-practices:
===============================
Ajax in Django - Best Practices
===============================
The following information is not specific to the Adjax framework, but rather use of Ajax in general.
It is intended to provide helpful information for tackling scenarios that the Adjax library itself is not built do directly cater for.
Put simply, it is a place for ideas, approaches and features that do not belong in a framework.
Essential knowledge
===================
Some problems are universal and need to be considered by developers.
Browser Caching
---------------
Internet Explorer is known to cache Ajax GET requests, which can cause some issues if your responses change. There are a few approaches to this:
- Use a POST request
- Append a unique GET parameter
- Use request headers (does not appear to work reliably)
jQuery has a ``cache`` parameter for their ``$.ajax()`` function, which makes use of the second approach above.
Adjax consequently takes the same approach.
Graceful degredation
====================
To be completed...
Performance Optimisation
========================
To be completed...