... | ... | @@ -16,6 +16,6 @@ JSON Padded (JSON-P) represents an older way of performing pan-domain requests w |
|
|
- The remote server performs the request and generates a JSON document e.g. `{"name":"wibble"}`
|
|
|
- The remote server then pads the JSON document with a function call e.g. `myrandomfunctionname({"name":"wibble"})`
|
|
|
- The client receives this padded JSON which is evaluated within a `<script>` tag and the JavaScript developer calls the function `myrandomfunctionname` which returns the JSON document
|
|
|
- Requests are made with the MIME type `application/javascript`
|
|
|
- Requests are made with the MIME type `text/javascript`
|
|
|
|
|
|
Whilst this methodology works well in older browsers it is not recommended because of their openness to cross-site request forgery attacks. |
|
|
\ No newline at end of file |