Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
1 vote
1 answer
112 views

PDF link opens to exact page on Windows but not on mobile or tablet

I’m using a link to open a PDF file hosted on SharePoint (or any other web location) and I want it to open directly at a specific page. For example: https://example.com/myfile.pdf#page=5 On Windows ...
Meir's user avatar
  • 187
0 votes
2 answers
80 views

How to style the targeted URL fragment in Angular?

How do we style the :target in Angular? For when we navigate to e.g. /categories/11#footnote-3, which opens the page for the details of category 11 and scrolls down to the element with id footnote-3. ...
ANeves's user avatar
  • 6,403
0 votes
1 answer
165 views

How do I maintain URL fragments when using Sphinx and Sphinx-reredirects to handle URL redirects?

I recently restructured a Sphinx documentation project by moving around a lot of files and arranging them into associated folders. This process changed the location urls of the existing documentation ...
David Ekete's user avatar
1 vote
1 answer
116 views

Jumping to a specific PDF tag in microsoft Edge [closed]

I'm trying to open PDF document on specific device tag in Edge browser. By device tag I mean a link in electrical documentation (eplan) in my case to a sensor. This functionality works in Chrome. For ...
Voj Mor's user avatar
  • 13
2 votes
1 answer
251 views

How to disallow specific fragment URLs using robots.txt?

How do you disallow dynamic URLs that have the following path in the robots.txt file. https://example.com/blogs/news/nameofthepost#How-Much-do-they-cost The posts do have canonical set but that didn't ...
user1683449's user avatar
1 vote
0 answers
183 views

Is there a way for Go Router in flutter to handle Fragment Parameters?

I'm currently implementing a flutter web app. I'm calling a 3rd party system and it's redirecting to the URL I provide to it. However it appends to the end of it #code=CODE&idtoken=IDTOKEN. So i'm ...
Ross McQuillan's user avatar
0 votes
0 answers
17 views

JavaScript - Get fragment value after Scroll To Text Hash Fragment '#:~:text=' from a URL [duplicate]

Using JavaScript how can the content after #:~:text= in the URL be obtained? #:~:text= is used to Scroll To Text Fragment. I would have expected the Get fragment (value after hash '#') from a URL ...
Joel Davis's user avatar
2 votes
1 answer
1k views

How to get parameters after hash mark # from a redirect URL in FastAPI?

I am facing an issue while working with Redirect Url and getting the data from QueryParams in Python using FastApi. I am using Azure AD Authorization Grant Flow to log in, below is the code which ...
Shabir jan's user avatar
  • 2,437
1 vote
0 answers
114 views

Why can't I submit a form on a page with a URL Fragment?

Stumbled across this today and not sure I understand what's going on. I have a form on a page; if the page doesn't have a URL fragment I can submit the form to reload the page whether I've changed ...
Warren Spencer's user avatar
1 vote
1 answer
215 views

Must the percent character be percent-encoded in a URL fragment?

The fragment portion of a URL reaches from the first # character to the end of the URL. Since reserved characters like %, ? and & have no special meaning in the fragment, there should be no need ...
Heiko Theißen's user avatar
3 votes
1 answer
231 views

Javafx getHostServices().showDocument not working when url includes fragments for local files

Im working on a javafx app and a requirement is that on clicking a hyperlink, it opens the given url in the browser. I have this working with the following url = "files/file.html"; ...
Awk11's user avatar
  • 83
0 votes
1 answer
158 views

How to share a URL with fragment in Safari on iPadOS

When I open a URL that ends in a fragment with Safari on iPadOS 15 (e.g. https://example.com/page#heading), Safari will scroll to the position identified by the fragment (heading). But when I then try ...
maf's user avatar
  • 353
0 votes
0 answers
227 views

Is it possible to match the url fragment in a chrome extension?

Currently using match patterns in chrome.contextMenus.create#targetUrlPatterns for a chromium extension, however I've run into an issue. Is it possible to somehow filter URLs by their fragment (the ...
Blair's user avatar
  • 101
0 votes
1 answer
793 views

Subscribing to URL fragment not firing event on change in Angular

I am using Angular 13 and I am trying to subscribe to the ActivatedRoute 'fragment'. The subscription is only receiving a notification when the page first loads, but is not receiving updates when the ...
Anker Peet's user avatar
1 vote
1 answer
645 views

How to highlight active fragment link?

I've a navigation bar that scrolls to the page's sections using fragments, e.g: // nav <a href="#section_dev">{'Development'}</a> // somewhere else in the page <a id="...
ixx's user avatar
  • 32.3k
0 votes
1 answer
71 views

Show anchor/fragment in Rust Iron framework?

I'm building a tool around an oauth implicit flow, which means that I eventually need to pull the access token from some URL in a request. I'm trying to build with Iron (I've also looked at Warp), but ...
hjfitz's user avatar
  • 449
0 votes
0 answers
203 views

Scroll to element in mat-dialog using fragment link

I'm implementing a list of posts in a dialog, where a post can quote another post. I would like to be able to scroll to the quoted post when clicking a link which looks like this: <a href="/...
Tane van Wifferen's user avatar
1 vote
1 answer
184 views

Is there a standard or preferred tag type for adding additional anchor / fragment links to a location?

I currently have an id attribute on each section heading in a HTML document, so that URLs can be generated with a hash fragment that links directly to that section in the document. For example: <h2 ...
Polynomial's user avatar
  • 28.4k
18 votes
5 answers
24k views

How to detect change in the URL hash in Next.js?

How do we detect a change in the URL hash of a Next.js project? I don't want to reload my page every time the slug changes. I cannot use <Link> since all of my data comes from DB Example: When ...
Appu Rajendran's user avatar
0 votes
1 answer
291 views

Servlet unable to get hash fragment from URL [duplicate]

Hi after redirection from OAuth server, I am unable to get the complete URL in my JAVA Servlet.My URL looks like below - https://host.vp.com/gui/MainPage.gdi#scope=openid%20profile&id_token=...
Cleonjoys's user avatar
  • 504
-1 votes
1 answer
174 views

Hash refresh in Javascript

I'm almost done with my previous issue, but now I'm dealing with something more subtle and annoying. I've got a page with some links like these ones: <a href = "page.html#1">First ...
Andrea Carta's user avatar
2 votes
2 answers
2k views

Scrapy : (400 Bad Request)HTTP status code is not handled or not allowed

As i am new to python and scrapy. I have been trying to scrape a website which is URL-fragmented. I am making a post request to get the response but unfortunately its not getting me the result. ...
Sourav Singh's user avatar
0 votes
1 answer
984 views

How can one retain URL fragment after server-side redirection?

Specifically, I'm currently working on a Ruby on Rails app where I require this behavior, but I intentionally worded my title in a language and framework agnostic manner after realizing that a lot of ...
dVVIIb's user avatar
  • 76
0 votes
1 answer
208 views

How to reload page when hash.location are the same javascript

I have i button that puts the hash (#feed) and i want when i am on this page with that has, when click the button again it reloads the page with that hash(#feed). Is there some way to do that?
Lucca's user avatar
  • 55
0 votes
1 answer
587 views

jQuery - Append hash to href from current URL

Let's say I have this URL in the address bar: www.example.com/pt.html#myhash Also I have an anchor that links to <a id="lang" href="https://www.example.com/en.html">Change ...
BornKillaz's user avatar
2 votes
1 answer
383 views

Linking to text fragment with element ID fallback

I would like to link to a text fragment, like so: https://pvk.ca/Blog/2019/01/09/preemption-is-gc-for-memory-reordering/#event-counts-with-x86-tso-and-futexes:~:text=However%2C%20if%20we%20go This ...
BeeOnRope's user avatar
  • 66.3k
23 votes
0 answers
825 views

What does colon tilde colon (:~:) mean in URL hash fragment? [duplicate]

Recently, I noticed that sometimes when I search on Google, Google can highlight the relevant part of the webpage by attaching a hash fragment like this: https://example.com/#:~:text=You%20may%20use%...
zypA13510's user avatar
  • 1,302
1 vote
1 answer
1k views

How to get the "fragment" part of an url in a nuxt middleware?

I want to get the access_token in the url after a redirection from AWS COGNITO in a "implicit" oauth flow. AWS Cognito redirect the browser to : https://mydomain/#access_token=xxxxx I want to get the ...
David Vergison's user avatar
1 vote
0 answers
148 views

Is there any official formatting for the URL fragment?

In the project I'm working on part the URL fragment is used to update the view. But if the view is updated by the URL fragment the vertical anchor position is lost. Is there an official way to ...
1.21 gigawatts's user avatar
3 votes
3 answers
2k views

Regex to match specific URL fragment and not all other URL possibilities

I have - let say - example.com website and there I have account page. It may have GET parameters, which is also considered part of account page. It also may have URL fragment. If it's home.html ...
pesho hristov's user avatar
0 votes
0 answers
286 views

How to link to a page part without a URL fragment?

I need to add links to a web application that point to specific parts of another page in the same application. Normally, it is done using a URL with a fragment part (an element ID after the '#' ...
pkalinow's user avatar
  • 1,747
0 votes
0 answers
301 views

GTM Strips URL fragments breaking functionality

We have on our site a physician directory search which has been working cross platform for years. Over the last few months, we have been getting reports that the functionality is broken. My debugging ...
David Phelan's user avatar
0 votes
1 answer
1k views

cURL offers an option to add the URL-fragment?

There are an option -d to append data as parameters at URL of GET, so I'm imagining that exists also an option to add the URL fragment (# "URL hash"). PS: no clues by curl --help | grep -i frag.
Peter Krauss's user avatar
  • 14.1k
3 votes
1 answer
1k views

Escaped # in URLs, sitemap and handling by Google crawler

We have a large set of URLs of which some contain a hash character. The hash is not to indicate a fragment, but part of the URL path, so we escape the hash by %23, e.g. http://example.com/example%231 ...
qqilihq's user avatar
  • 11.5k
1 vote
3 answers
304 views

Looking for regular expression that matches the first part of a URL fragment

I have a URL fragment like 'users/123/edit' and I would like to match the first part of the string (in this case 'users'). The URL fragment could also be just 'users' and it should also match 'users'. ...
johnny's user avatar
  • 9,116
200 votes
5 answers
115k views

Proper URL forming with a query string and an anchor hashtag

When both a query string and anchor tag (hash tag) are visible in a URL, what is the proper order for them to appear? http://www.whatever.com?var=val#anchor or http://www.whatever.com#anchor?var=val ...
Dan's user avatar
  • 3,890
242 votes
8 answers
215k views

How do I get the fragment identifier (value after hash #) from a URL?

Example: www.site.com/index.php#hello Using jQuery, I want to put the value hello in a variable: var type = …
cppit's user avatar
  • 4,564
135 votes
10 answers
252k views

Get fragment (value after hash '#') from a URL [closed]

How can i select the fragment after the '#' symbol in my URL using PHP? The result that i want is "photo45". This is an example URL: http://example.com/site/gallery/1#photo45
ilija veselica's user avatar
1 vote
2 answers
984 views

HTML fragment links work with CSS positioning?

Last night I decided to add HTML fragment links in my computer listing page. However, no matter the pattern of linking, or whichever browser I use, those fragment links are simply not navigatable. ...
icelava's user avatar
  • 9,865