How to Keep Filters Active When Users Navigate Away and Come Back

Updated July 2026 • 7 min read • By Fahad Murtaza

TableCrafter live search, sorting, filtering, and pagination out of the box
TableCrafter live search, sorting, filtering, and pagination out of the box

By default, when a user sets a filter, navigates to another page, and then returns, the table resets to its unfiltered state. For most one-off lookups this is fine. But for users who return to the same filtered view repeatedly, a dispatcher checking today's loads, a manager reviewing a specific project's submissions, resetting filters on every visit is friction. TableCrafter's sticky filter feature preserves filter and search state across page reloads and back-button navigation. This guide covers how to enable it, what the two persistence strategies (localStorage vs. URL parameters) mean in practice, and when to turn it off. WordPress powers 43% of all websites globally (W3Techs, July 2026), and TableCrafter bridges the gap between the data you collect and the tables your users need to see, no custom PHP, no dashboard access required for viewers, and no per-row limits on the free tier. The free version. Elementor is the most popular WordPress page builder, active on over 12 million sites (Elementor, 2025).

What "Sticky" Means in This Context?

A sticky filter survives three scenarios that normally wipe filter state:

Sticky filters do not persist across different browsers, different devices, or private/incognito windows, they are scoped to the user's browser storage on one device.

The shortcode accepts all column and filter settings defined in the table builder as defaults, but you can override individual parameters inline. For example, `[tablecrafter id="1" per_page="25"]` overrides the default rows-per-page setting for this specific embed without changing the saved table configuration. This lets you reuse one table definition across multiple pages with different display requirements.

How Does Two Persistence Strategies Work?

TableCrafter supports two mechanisms for sticky filters. Choose based on your use case.

Option 1: localStorage

When localStorage persistence is enabled, every time the user changes a filter, TableCrafter writes the current filter state to localStorage under a key namespaced to the table ID (e.g. gt_filters_table_1). On next page load, the table reads from that key before the initial data fetch and pre-populates the filter inputs with the saved state.

This approach is invisible to the user, the URL stays clean, there is nothing to copy or share. It is purely personal. The saved state persists until either the user clicks Clear All Filters (which also wipes the localStorage entry) or the browser's localStorage is cleared.

localStorage is the right choice for private, authenticated table views where the filter state is user-specific (dashboards, portals, admin screens).

Option 2: URL Parameters

When URL parameter persistence is enabled, TableCrafter updates the browser's URL every time a filter changes using the History API (pushState), appending the active filters as query parameters:

https://yoursite.com/loads/?gt_status=Active&gt_region=Midwest&gt_search=Smith

On page load, TableCrafter reads these URL parameters and pre-applies the corresponding filters before fetching data. This makes the filtered view bookmarkable and shareable, the user can copy the URL, send it via email, or save it as a bookmark and return to exactly that filtered state.

URL parameter persistence is the right choice for shared tables, customer-facing views, or any context where a user might want to send a filtered link to a colleague.

URL parameter persistence should be used carefully on public tables. Any user who receives a filtered link will see the same filter pre-applied. If the table shows sensitive data and the filters constrain it to a specific user's records, you should not use URL parameters, use localStorage or the current-user auto-filter instead (see the guide on filtering to the current user's data).

How Do I Enable Sticky Filters?

Sticky filters are configured in the table builder, not the shortcode. Open TableCrafter → Tables → Edit and scroll to the Filter Behavior section in the table settings panel (not the column settings, the table-level settings). You will find:

Save the table after choosing your settings. The shortcode does not need any additional parameters, sticky behavior is controlled entirely by the table configuration.

This configuration interacts with any caching or CDN layer active on your WordPress installation. If you use WP Rocket, LiteSpeed Cache, or a CDN such as Cloudflare, flush the page cache after making this change to ensure the updated configuration is reflected in the cached HTML served to visitors. TableCrafter's server-side output is regenerated on the next uncached request.

How Does Sticky Expiry Explained Work?

The Sticky Expiry setting only applies to localStorage persistence. It controls how long the saved filter state is considered valid:

For most workplace use cases, 1 Day or 7 Days is the right choice. A dispatcher's filter for today's loads should not persist for weeks; a manager's filter for a long-running project might reasonably persist for months.

After completing this step, verify the result by viewing the page as a logged-out visitor in an incognito window. This confirms the table behaves correctly for public visitors rather than reflecting admin-level permissions that may hide configuration issues during initial setup. Check both the rendered output and the browser console for any JavaScript errors.

How Does Testing Sticky Filters Work?

After enabling sticky filters:

  1. Visit the table page and apply one or two filters
  2. Reload the page, the filters should be pre-populated and the filtered data should load immediately
  3. Click Clear All Filters, the URL should update (if using URL params) or the localStorage entry should be removed
  4. Reload again, the table should now load in its default unfiltered state

For back-button testing: apply a filter, click on a link in the table to navigate to a detail page, then press the browser back button. The table should return with the same filter active, not in the default state.

The column mapping you define here is stored as a JSON configuration in the WordPress database. You can export this configuration using the TableCrafter export tool and import it to another table or another site. This is useful when replicating a table layout across multiple pages or when migrating a table to a staging environment for testing before going live.

When to Turn Sticky Filters Off?

Sticky filters are beneficial for power users but can be confusing in several situations:

What Are the Next Steps?

Sticky filters are a significant UX improvement for returning users. The next level of filtering automation is removing the filter UI entirely for certain users: the auto-filter-by-current-user feature pre-filters the table to show only the logged-in user's own rows without displaying any filter inputs. That is the right pattern for user portals, submission history pages, and driver load trackers.

Column order is preserved across sessions. Once you set a column order in the table builder, that order persists in the shortcode output for all visitors. Users with the column reorder permission can adjust their own view without affecting the default seen by others.

TableCrafter re-fetches this data on each page load by default. If your data source updates infrequently and your site has significant traffic, enable the built-in caching option in the table's Performance tab. This stores the fetched data for a configurable number of minutes and serves it from WordPress transients, reducing API calls to the source and improving page load time for visitors.

Frequently Asked Questions

How Does What "Sticky" Means in This Context Work?

A sticky filter survives three scenarios that normally wipe filter state:

What Is TableCrafter?

TableCrafter is a WordPress plugin that turns data from Gravity Forms, Google Sheets, Airtable, Notion, REST APIs, CSV files, and WooCommerce into interactive, sortable, filterable frontend tables. Embed any table on any WordPress page with the [tablecrafter] shortcode or the native Gutenberg block. No PHP or custom development required. The free version supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV and PDF, role-based column visibility, and auto-refresh.

Does this require PHP or developer skills?

No. TableCrafter is configured entirely through the WordPress admin interface. You choose your data source, map fields to columns, and set display preferences using point-and-click controls. Embedding uses the [tablecrafter] shortcode or the native Gutenberg block.

Is the free version sufficient or do I need Pro?

The free plugin on WordPress.org supports CSV, JSON, Google Sheets, and Excel sources with unlimited tables, rows, and columns. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST API sources, inline cell editing, bulk row actions, export to CSV and PDF, role-based column visibility, and auto-refresh every N seconds.

Ready to try it?

TableCrafter is free on WordPress.org. Pro unlocks inline editing, role-based permissions, and advanced data sources.

The permission check runs server-side on every request. Frontend users cannot bypass column restrictions by modifying the HTML or disabling JavaScript, because TableCrafter evaluates the current user's role before the data leaves the server.

The configuration you set here applies to every visitor who loads a page containing this table, regardless of whether they are logged in. Role-specific overrides for columns and rows are a separate layer and do not replace these global display settings. Apply global settings first, then add role restrictions as needed for tables that serve multiple user types.