NEWS
httpgd 2.1.4 (2026-03-04)
- New "Remote access" vignette: host, port and token, security notes, SSH port forwarding, reverse proxies (nginx, Caddy) and editor proxies (code-server, JupyterHub, RStudio Server), the
hgd URL parameter and the polling fallback (#229).
- New
title argument to hgd() (and option httpgd.title) and new hgd_title() to get or set the browser tab title of connected clients, useful to tell several R sessions apart (#232, @r2evans).
- An inactive device is shown as a small "Device inactive" banner in the history sidebar (or a badge when the sidebar is hidden) instead of an overlay that blocks the plot view (#233, @r2evans).
- Adding a plot no longer refetches every history thumbnail; only the newest plot, which can still change, is reloaded (#260, @r2evans).
- Thumbnails no longer go stale when an older plot becomes the newest again or when a device is restarted on the same port.
hgd() validates title before opening the device, so an invalid title no longer leaves an orphaned device behind.
hgd_details(), hgd_title() and other hgd_*() functions now error instead of crashing R when the target device is not a httpgd device.
hgd_url() with a numeric plot index or a plot ID from unigd::ugd_id() now links to the rendered plot instead of a missing page (#252).
/plot and /remove return 404 when the requested index or id matches no plot. Before, /plot served the last plot and /remove?id= with an unknown id removed the last plot.
hgd_url() errors on endpoints that are not a single string, plot ID or plot index. Query parameters in ... override the generated index or id.
- Server tests are skipped on CRAN.
- The WebSocket endpoint now requires the security token like the HTTP endpoints (as
token query parameter or X-HTTPGD-TOKEN header), and messages sent by one client are no longer forwarded to the other clients. The bundled client sends the token; so does vscode-R since 3.2.0. Clients that open the WebSocket without the token are rejected and have to poll instead.
- The static file route only serves plain file names from the client directory. Before, on Windows, a path with
..\ could read files outside of it. Crow's default /static/ route (files in a static/ folder of the working directory) is disabled.
hgd(cors = FALSE), the default, now sends no CORS headers. Before, Access-Control-Allow-Origin: * was sent regardless of cors.
- Security tokens are drawn from the operating system's random source instead of a time-seeded generator, and
token = TRUE now generates 16 instead of 8 characters.
- The
download file name of /plot is sanitized before it goes into the Content-Disposition header: control characters are removed, quotes, backslashes and path separators are replaced, and non-ASCII names are sent as RFC 5987 filename*.
/plot returns 400 for invalid sizes: width and height must be whole numbers from 1 to 10000 pixels with at most 50 megapixels in total, and zoom a number from 0.01 to 100. Before, zoom = 0 or very large sizes could make R allocate huge buffers.
hgd() starts the server before attaching it to the device and errors with the reason when it cannot start (for example when the port is in use, or for an invalid host or port), instead of crashing R or returning a device without a server. A failed start leaves no server attached, so it can be retried on the same device. Requests that arrive before the device is attached get 503. On Windows a port that is already in use is no longer silently shared.
- Closing the device right after opening it no longer hangs.
- Closing the device while a request that needs R (such as
/remove, /clear or a re-render in /plot) is in progress no longer hangs R. New requests get 503 once the device is closing, and requests in progress are given up by unigd. Requires unigd 0.2.0.9001 or later.
- Closing one of several httpgd devices no longer leaves the others logging through a freed handler.
/info and hgd_details() report the actual package version (it said 2.1.3).
- The token is compared in constant time.
- The plot viewer works behind reverse proxies that serve it under a path prefix (code-server, VS Code remote, JupyterHub, RStudio Server viewer): API and WebSocket URLs are derived from the page address including its path (#200, likely #183).
- The server also answers under any path prefix (
/absproxy/8888/plots, and /absproxy/8888/ for the WebSocket), so the viewer works without configuration behind reverse proxies that keep their prefix, such as code-server /absproxy/<port>/, jupyter-server-proxy /proxy/absolute/<port>/ or nginx without prefix stripping.
hgd(cors = TRUE) sends Access-Control-Allow-Headers: X-HTTPGD-TOKEN, *: the token header by name, for browsers without wildcard support, and any other header. Before, it sent Access-Control-Allow-Origin, *.
hgd_url(explicit = TRUE) adds the hgd={host}:{port} parameter again, as documented (#253). host can also be a base URL with scheme and path prefix, e.g. hgd_url(host = "https://example.com/proxy/8888").
- The viewer accepts
?hgd= values with a scheme (http://, https://, ws://, wss://); before, ?hgd=http://... produced an invalid WebSocket URL. The page address is tried first, so a hgd host that is wrong for a proxied viewer no longer matters; hgd is used when no httpgd server answers at the page address.
- The viewer reconnects automatically after the WebSocket connection drops, and falls back to polling when WebSockets do not get through but HTTP does (retrying the WebSocket every 5 minutes). While HTTP still answers, a failing WebSocket no longer shows "Connection lost".
- Requests time out (5 s, or 30 s for requests that wait for R), so a stuck connection counts as lost instead of stalling updates.
- In polling mode, the viewer reports the connection state correctly, keeps retrying after an outage, ignores responses from before a reconnect and never runs more than one
/state or /plots request at a time.
- Keyboard shortcuts no longer capture Ctrl or Cmd combinations (Cmd+D, Ctrl+C, Ctrl+S, browser zoom), and Alt+D (clear all plots) works on macOS.
- Removing or clearing plots and downloading the SVG show an error message when the server request fails, instead of silently doing nothing or saving an error page. Clearing an empty history or removing an already removed plot is not an error.
- Resizing the viewer waits for the size to settle (200 ms) before requesting a new render, instead of rendering on every resize step.
hgd_watch() no longer clears the plots on every interval while a watched file is missing.
- The viewer accepts
websockets=0 (as documented) as well as ws=0, and history=0 as well as sidebar=0; the documentation now names ws=0.
- Require R >= 4.3.0 (as unigd does) and cpp11 >= 0.5.4.
- Updated the web client's build toolchain and dependencies (Vite 8, TypeScript 7 type checking, Lucide 1, tailwind-variants 4).
- Address CRAN review feedback (documentation, code style).
- Add R linting CI.
httpgd 2.1.3
- Fix compilation failure with 'Clang 21' (middleware default constructor).
- Add Clang 21 R CMD check to CI.
httpgd 2.1.2
- Fix compilation failure with 'Clang 21' (vendored 'CrowCpp' tuple member initialization).
httpgd 2.1.1
- Fix compilation failure with 'Clang 21' (vendored 'CrowCpp' CORS middleware default constructor).
httpgd 2.1.0
- Update vendored 'CrowCpp' library to v1.2.1.
- Update 'AsioHeaders' dependency to >= 1.28.2 (fixes macOS deprecation warnings).
- Remove unused code causing compiler warnings.
- Modernize build system and CI/CD workflows.
- Require R >= 4.2.0.
httpgd 2.0.4 (2025-03-15)
- Fix 'Clang 19' deprecation warning.
httpgd 2.0.3 (2025-02-28)
- Drop 'C++14' requirement.
httpgd 2.0.2 (2024-06-05)
- Fix 'gcc 14' compile warning.
httpgd 2.0.1 (2024-03-11)
- Fix compilation issues with 'clang 18' and 'libc++'.
httpgd 2.0.0
- Split graphics rendering and R interface to separate package 'unigd'.
- Large refactoring and rewrite.
- Numerous fixes and improvements in 'unigd' (see 'NEWS.md' there).
- Migrate to crow web server library (due to belle being deprecated).
- Add live reload feature.
- Switched from 'Boost' to 'Asio'
- Various library updates.
- Various minor fixes and improvements.
httpgd 1.3.0 (2022-02-02)
- Fixes for R 4.2 UCRT support (thanks Tomas Kalibera and Uwe Ligges).
- Added 'pkgdown' documentation and various vignettes (thanks eitsupi for the article on Docker).
- Added RStudio viewer support.
- Added version info API.
- Added SVGZ support.
- Improved client export dialog.
- Minor fixes and internal changes.
httpgd 1.2.1 (2021-09-20)
- Fix macOS builds.
- Minor documentation changes.
httpgd 1.2.0 (2021-09-18)
- Client rewrite and static build pipeline.
- Added client export dialog.
- Various client UI improvements.
- Implemented modular rendering.
- Cairo based renderers for PNG, PDF, EPS and PS.
- Portable SVG renderer (for easier embedding and styling).
- Special renderers: Serialized JSON, meta information and strings.
- Additions to R and HTTP APIs for selecting and listing available renderers.
- All startup default parameters can now be set as options.
- Zoom level is now handled server side.
- Fix some graphical errors of the SVG renderer.
- Improved server URL generation.
- Browser can be specified when the server URL is opened from R.
- Dependency updates and UCRT support.
httpgd 1.1.1 (2021-04-02)
- Fixed font weight related rendering crash.
- Small client adjustments.
httpgd 1.1.0 (2021-04-01)
- Added plot history sidebar.
- Improved SVG rendering performance.
- Added static plot ID API.
- Font handling improvements.
- Various client improvements.
- Added API documentation vignette.
- Fixed client device inactive desynchronisation.
- Fixes for R devel.
- Library updates.
httpgd 1.0.1 (2021-01-21)
- Fix memory allocation issues with graphics device creation and libpng.
- Set
cpp11 as a compile time only dependency.
httpgd 1.0.0 (2021-01-19)
- First official version intended for release on CRAN.