Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(guide/$location) duplicated 'Crawling your app' section #7244

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 14 additions & 28 deletions docs/content/guide/$location.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down