Title: Customizer Browser History
Author: Weston Ruter
Published: <strong>15 de julio de 2016</strong>
Last modified: 9 de noviembre de 2017

---

Buscar plugins

![](https://ps.w.org/customizer-browser-history/assets/banner-772x250.png?rev=1462693)

Este plugin **no se ha probado con las últimas 3 versiones mayores de WordPress**.
Puede que ya no tenga soporte ni lo mantenga nadie, o puede que tenga problemas 
de compatibilidad cuando se usa con las versiones más recientes de WordPress.

![](https://ps.w.org/customizer-browser-history/assets/icon.svg?rev=1462693)

# Customizer Browser History

 Por [Weston Ruter](https://profiles.wordpress.org/westonruter/)

[Descargar](https://downloads.wordpress.org/plugin/customizer-browser-history.0.5.2.zip)

 * [Detalles](https://es.wordpress.org/plugins/customizer-browser-history/#description)
 * [Valoraciones](https://es.wordpress.org/plugins/customizer-browser-history/#reviews)
 * [Desarrollo](https://es.wordpress.org/plugins/customizer-browser-history/#developers)

 [Soporte](https://wordpress.org/support/plugin/customizer-browser-history/)

## Descripción

_This is a feature plugin intended to implement [#28536](https://core.trac.wordpress.org/ticket/28536):
Add browser history and deep linking for navigation in Customizer preview_

This plugin keeps the Customizer URL in the browser updated with current previewed
URL as the `url` query param and current expanded panel/section/control as `autofocus`
params. This allows for bookmarking and also the ability to reload and return go
the same view (which is great for developers), including which device you are previewing(
desktop, tablet, or mobile). Not only will the URL be kept in sync with the current
customizer UI, but new browser history entries will be added as you navigate around
the site in the preview (via `history.pushState()`), allowing you to use the back/
forward buttons as you would normally when browsing the site outside the customizer.
The scroll position for each previewed URL is tracked as well, so that when you 
navigate back/forward the scroll position will be restored, just as happens when
browsing the site outside the customizer preview. Restoring the scroll position 
also works when reloading the customizer, as the position is persisted in a `scroll`
query parameter: again, this is extremely useful during development.

This plugin complements well the [Customize Snapshots](https://github.com/xwp/wp-customize-snapshots)
plugin which allows you to save your Customizer state in a shapshot/changeset with
an associated UUID that also gets added to the browser URL in the Customizer.

For example, if you load the Customizer and then click the “Site Identity” section,
the URL will be replaced to add `autofocus[section]=title_tagline`.

If you navigate into the nav menus panel, open a menu section, and then expand a
nav menu item control, then the URL will have these `autofocus` params added:

    ```
    autofocus[panel]=nav_menus&autofocus[section]=nav_menu[87]&autofocus[control]=nav_menu_item[5123]
    ```

And while these changes to the `autofocus` params are being made in the browser’s
URL as the Customizer UI is interacted with, if you navigate to another page in 
the preview the `url` parameter will also be replaced to reflect the new preview
URL.

Note that the `url` param will be URL-encoded. So a typical Customizer URL would
get updated to look like:

    ```
    http://example.com/wp-admin/customize.php?url=http%3A%2F%2Fexample.com%2Fsample-page%2F&autofocus[panel]=widgets&autofocus[section]=sidebar-widgets-sidebar-1&autofocus[control]=widget_text[10]&device=mobile&scroll=200
    ```

The plugin will also persist the scroll position from the frontend to preview frame
in the Customizer after clicking the “Customize” link in the frontend admin bar.
This ensures you can quickly start editing whatever you were looking at the moment
you clicked Customize, and it makes the Customizer load from the frontend in a more
seamless way.

Additionally, as you navigate around the Customizer preview, the close link in the
Customizer controls pane will keep updating to point to the same URL that you are
previewing, along with persisting the scroll position. In this way, whenever you
close the Customizer via this link the user experience is that the Customizer sidebar
is just removed, similar to as if they clicked the “Hide Controls” link at the bottom
of the sidebar. This behavior is only active if the user had clicked the Customize
link from the frontend. If they clicked Customize from the admin, then the Close
link will remain linking back to the admin page they came from. Note that for responsive
themes like Twenty Seventeen, the synced scroll position between the frontend and
backend won’t always appear seamless since the Customizer controls panel being expanded
causes the element dimensions in the preview to change.

**Development of this plugin is done [on GitHub](https://github.com/xwp/wp-customizer-browser-history).
Pull requests welcome. Please see [issues](https://github.com/xwp/wp-customizer-browser-history/issues)
reported there before going to the [plugin forum](https://wordpress.org/support/plugin/customizer-browser-history).**

## Reseñas

![](https://secure.gravatar.com/avatar/242c0cad5e2da1eca9c7246640d2f0a20dc5d21f2046333a6ce3cec6f4acc9c1?
s=60&d=retro&r=g)

### 󠀁[I was about to create a similar plugin myself, but…](https://wordpress.org/support/topic/i-was-about-to-create-a-similar-plugin-myself-but/)󠁿

 [Andrei Surdu](https://profiles.wordpress.org/_smartik_/) 18 de junio de 2017

I was about to create a similar plugin myself, but I’m lucky to find this plugin.
Now I’m happy to say that it saved me some time. When refreshing the customizer 
browser frequently this plugin is really handy. Thank you.

![](https://secure.gravatar.com/avatar/67bb030a417af66d3124160e28a0fdcc59b6f130e75e84b0cd1a2cdd98daea98?
s=60&d=retro&r=g)

### 󠀁[Resumable Customizer sessions are a big time saver](https://wordpress.org/support/topic/resumable-customizer-sessions-are-a-big-time-saver/)󠁿

 [Frankie Jarrett](https://profiles.wordpress.org/fjarrett/) 3 de septiembre de 
2016

This is a true time saver after Customizer reloads that really adds up….I’ve only
used it for a day but I’m already so used to it I’m not sure I can do without it.
Great job!

 [ Leer todas las 2 reseñas ](https://wordpress.org/support/plugin/customizer-browser-history/reviews/)

## Colaboradores y desarrolladores

«Customizer Browser History» es un software de código abierto. Las siguientes personas
han colaborado con este plugin.

Colaboradores

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)
 *   [ XWP ](https://profiles.wordpress.org/xwp/)

[Traduce «Customizer Browser History» a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/customizer-browser-history)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/customizer-browser-history/),
echa un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/customizer-browser-history/)
o suscríbete al [registro de desarrollo](https://plugins.trac.wordpress.org/log/customizer-browser-history/)
por [RSS](https://plugins.trac.wordpress.org/log/customizer-browser-history/?limit=100&mode=stop_on_copy&format=rss).

## Registro de cambios

#### 0.5.2

 * Prevent autofocus params for themes panel and its sections from being included
   during theme switch. See [#22](https://github.com/xwp/wp-customizer-browser-history/issues/22).
 * Only remove parent construct autofocus params if child is defined statically;
   ensures that lazy-loaded children can be autofocused.
 * Remove code now irrelevant as of WordPress 4.7.
 * Bump minimum WordPress requirement to 4.7.
 * Bump tested to 4.9.

#### 0.5.1

Fix reference to `package.json` which is not included in build.

#### 0.5.0

Persist scroll position and previewed URL between frontend and customizer preview.
See [#20](https://github.com/xwp/wp-customizer-browser-history/pull/20).

#### 0.4.7

Prevent dropping non-home initial `url` param when loading customizer. See [#19](https://github.com/xwp/wp-customizer-browser-history/pull/19).

#### 0.4.6

Fix compatibility with WordPress 4.6. See [#17](https://github.com/xwp/wp-customizer-browser-history/pull/17).

#### 0.4.5

Ensure `changeset_uuid` param is added to `customize.php` URL if state is dirty 
OR the changeset post exists. PR [#16](https://github.com/xwp/wp-customizer-browser-history/pull/16).

#### 0.4.4

Only include one `autofocus` param. If `autofocus[control]` is present, skip including`
autofocus[section]` (since implied). Likewise, if `autofocus[section]` is present,
also exclude its containing `autofocus[panel]` since it is also implied. By only
including one `autofocus` param the URL bar is less cluttered, but also an issue
is fixed where focus may not reliably be added due to apparent inconsistencies in
which construct is autofocused first (the control should really be the last to get
focus).

#### 0.4.3

Send scroll message to previewer to fix 4.7 scroll position.

#### 0.4.2

Misc cleanup and improve integration with WP 4.7.

#### 0.4.1

Fixed issue whereby an expanded widget control could persist its `autofocus` param
when another section is expanded.

#### 0.4.0

 * Added persistence of `scroll` position when navigating back/forward in the preview
   and when reloading the customizer.
 * Renamed the `customize_previewed_device` query param to just `device`.
 * Improved the building of the URL query params to omit any params that are the
   same as the defaults, so `device=desktop` and `scroll=0` should not be shown,
   nor should a `url` that points to the home URL.
 * Fixed dropping of value-less query params, e.g. `customize.php?debug`

#### 0.3.0

 * Add back/forward browser history for navigation in the Customizer preview. See
   [#2](https://github.com/xwp/wp-customizer-browser-history/issues/2), PR [#8](https://github.com/xwp/wp-customizer-browser-history/pull/8).
 * Eliminate initial insertion of `url` and `customize_previewed_device` params 
   when same as default.

#### 0.2.0

Persist the device being previewed (desktop, tablet, mobile) in the URL via a new`
customize_previewed_device` query param. See [#3](https://github.com/xwp/wp-customizer-browser-history/issues/3).

#### 0.1.1

Remove `autofocus[control]` when there is not a section expanded, such as when a
widget is expanded when the sidebar section is collapsed.

#### 0.1.0

Initial release.

## Meta

 *  Versión **0.5.2**
 *  Última actualización **hace 9 años**
 *  Instalaciones activas **10+**
 *  Versión de WordPress ** 4.7 o superior **
 *  Probado hasta **4.9.29**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/customizer-browser-history/)
 * Etiquetas:
 * [customize](https://es.wordpress.org/plugins/tags/customize/)[customizer](https://es.wordpress.org/plugins/tags/customizer/)
 *  [Vista avanzada](https://es.wordpress.org/plugins/customizer-browser-history/advanced/)

## Valoraciones

 5 de 5 estrellas.

 *  [  2 valoraciones de 5 estrellas     ](https://wordpress.org/support/plugin/customizer-browser-history/reviews/?filter=5)
 *  [  0 valoraciones de 4 estrellas     ](https://wordpress.org/support/plugin/customizer-browser-history/reviews/?filter=4)
 *  [  0 valoraciones de 3 estrellas     ](https://wordpress.org/support/plugin/customizer-browser-history/reviews/?filter=3)
 *  [  0 valoraciones de 2 estrellas     ](https://wordpress.org/support/plugin/customizer-browser-history/reviews/?filter=2)
 *  [  0 valoraciones de 1 estrellas     ](https://wordpress.org/support/plugin/customizer-browser-history/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/customizer-browser-history/reviews/#new-post)

[Ver todas las valoraciones](https://wordpress.org/support/plugin/customizer-browser-history/reviews/)

## Colaboradores

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)
 *   [ XWP ](https://profiles.wordpress.org/xwp/)

## Soporte

¿Tienes algo que decir? ¿Necesitas ayuda?

 [Ver el foro de soporte](https://wordpress.org/support/plugin/customizer-browser-history/)