docs(guide/$location) remove duplicate 'Crawling your app' section

The "Crawling your app" section was duplicated.
I just removed the duplication and moved the section to the 'Caveats' section.

Closes #7244
This commit is contained in:
Diego Plentz
2014-04-24 21:17:17 -03:00
committed by Peter Bacon Darwin
parent 2866daf7d6
commit de1461da78

View File

@@ -237,20 +237,6 @@ it('should show example', inject(
));
```
### Crawling your app
To allow indexing of your AJAX application, you have to add special meta tag in the head section of
your document:
```html
<meta name="fragment" content="!" />
```
This will cause crawler bot to request links with `_escaped_fragment_` param so that your server
can recognize the crawler and serve a HTML snapshots. For more information about this technique,
see [Making AJAX Applications
Crawlable](http://code.google.com/web/ajaxcrawling/docs/specification.html).
## HTML5 mode
In HTML5 mode, the `$location` service getters and setters interact with the browser URL address
@@ -344,20 +330,6 @@ are not prefixed with `.` and will not be intercepted by the `otherwise` rule in
Using this mode requires URL rewriting on server side, basically you have to rewrite all your links
to entry point of your application (e.g. index.html)
### Crawling your app
If you want your AJAX application to be indexed by web crawlers, you will need to add the following
meta tag to the HEAD section of your document:
```html
<meta name="fragment" content="!" />
```
This statement causes a crawler to request links with an empty `_escaped_fragment_` parameter so that
your server can recognize the crawler and serve it HTML snapshots. For more information about this
technique, see [Making AJAX
Applications Crawlable](http://code.google.com/web/ajaxcrawling/docs/specification.html).
### Relative links
Be sure to check all relative links, images, scripts etc. You must either specify the url base in
@@ -525,6 +497,20 @@ forward slash if it is missing.
Note that the `!` prefix in the hashbang mode is not part of `$location.path()`; it is actually
hashPrefix.
## Crawling your app
To allow indexing of your AJAX application, you have to add special meta tag in the head section of
your document:
```html
<meta name="fragment" content="!" />
```
This will cause crawler bot to request links with `_escaped_fragment_` param so that your server
can recognize the crawler and serve a HTML snapshots. For more information about this technique,
see [Making AJAX Applications
Crawlable](http://code.google.com/web/ajaxcrawling/docs/specification.html).
# Testing with the $location service