Questions tagged [url]

The web boasts the existence of a Universal Resource Locator (URL), which serves as an all-encompassing identifier. Essentially, a URL acts as a pointer directing towards a particular spot on the vast web and facilitating convenient access to the desired resource located there.

What is the best way to clear a token from SessionStorage upon exiting an Angular application?

I need to clear my sessionStorage every time I exit my application. App Module: export class AppModule implements OnInit, OnDestroy{ constructor(private overlayService: OverlayService, private logger: LoggerService, private userService: UserService, pr ...

Obtain the parameter value from the resolve function in ui-router

Using window.open, I plan to open a URL such as https://localhost:3000/new?HostId=8Ocs_Onuv1wowozxAAAS&_host_Info=excel%7Cweb%7C16.00%7Cen-us%7Cc8b501ce-c51d-b862-701e-5c623e1a70e0%7CisDialog. The site https://localhost:3000 hosts a MEAN stack applica ...

Node/Express: Retrieve the req.query parameter from the URL and convert it into a UNIX timestamp

Here is the URL that I am working with: In my Express app.get function, I am trying to extract 2015-12-25 from the query string and return JSON data containing a UNIX timestamp and a UTC timestamp. The structure of the JSON should be as follows: {unix: & ...

Retrieving the current webpage URL without using Selenium

Is there a way to extract an authorization code from an Oauth2 redirect URI without using Selenium Webdriver? When a user clicks "allow" on the Oauth2 consent form, they are redirected back to a specified URL with an important authorization code in the pa ...

Extracting Information with BeautifulSoup for every individual subpage - lengthy and varied URL structure

My current project involves scraping NFL passing data from the years 1971 to 2019. I was successful in extracting data from the first page of each year using the following code: # Here is the code that works: passingData = [] # initializing an empty list ...

Prevent jQuery AJAX from stripping away the # character

Is it possible for the jQuery ajax function to preserve anchors in URLs, such as Something.html#anchor? What happens if we pass the # symbol as a parameter for a script? Are there ways to stop jQuery from removing the anchor in this scenario? ...

What is the proper way to encode image URLs for use in CSS?

For the div element in my code, I want to allow users to input a URL that will be applied as a CSS background image, like this: background-image: url("/* user specified URL here*/") I'm concerned about security. How can I properly escape the URL to ...

Is there a way to modify the window's location without having to reload it and without resorting to any sne

Initially, I believed that the hash hack was a necessity, but after observing the recent updates from Facebook, my perspective has shifted. The original hash hack (not certain if this is the correct term) involved changing location.hash to save a state in ...

Tips for using hyphens in Shopware 5 controller routes and beginning them with lowercase letters

Is it possible to include dashes in the route and have all letters be lowercase in shopware? For example: class example-name-for-route{ } Expected route: www.example.com/example-name-for-route ...

Initiate an interactive pathway using @

Within my NextJS application, utilizing the pages router, there is a specific file called @[username].tsx. This format mirrors YouTube's user profile links and resides in the pages folder. Despite this setup, attempting to access /@lordsarcastic results ...

Generate a custom website using React to display multiple copies of a single item dynamically

As a newcomer to React and web development, I've been pondering the possibility of creating dynamic webpages. Let's say I have a .json file containing information about various soccer leagues, structured like this: "api": { "results": 1376, "leagu ...

Using R programming language to download PDF files from a website through web scraping

Looking for assistance in R coding to automatically download all the PDFs linked on this URL: . The goal is to save these PDFs into a designated folder. I've attempted the following script with guidance from , however, it's resulting in errors: library(tid ...

Navigate through URLs without using wildcards

Can someone please help me with this Python code? It's meant to loop through URLs using a wildcard* that replaces the unique id for each match. The issue I'm facing is that the text to be wildcarded sits between the invariant part of the URL and the id. ...

Monitor and control access to images to prevent unauthorized viewing or downloading

Is there a way to display an image on a web page without allowing direct access to it? I want to prevent users from being able to view the image by simply manipulating the URL, as seen in some Facebook applications. Are there methods for monitoring image ...

Modify URL parameters using history.pushState()

Utilizing history.pushState, I am adding several parameters to the current page URL after performing an AJAX request. Now, based on user interaction on the same page, I need to update the URL once again with either the same set of parameters or additional ...

Using PHP variables as parameters in URL queries

I have a variety of URLs with different query strings like view.php?id=5 view.php?id=6 view.php?id=7 On another PHP page, I am using file_get_contents in the following way: $page = file_get_contents('view.php?id=5'); $file = 'temp/fo ...

Ways to Activate a Modal Using a Hyperlink

One of the features on my Next.js page is a modal that can be triggered by clicking a button: <button type='button' onClick={() => setOpen(true)}> The modal component looks like this: <Modal id='demo' show={isOpen} on ...

Incorporating data from a MySQL database into a PHP page using a variable included in the URL

I am currently working on designing a website and one of the features I would like to implement is the ability to create unique URLs for users. My goal is to have the URL structured as follows: http://www.example.com/page.php?user_id=3 Each user would ha ...

"Exploring the world of AngularJS routing and using htaccess for rewriting URLs

How can I seamlessly integrate AngularJS ngRoute and htaccess rewrite? Currently, my ngRoute setup generates URLs like this: http://domain.com/#/something/somestring However, I would prefer cleaner URLs like: http://domain.com/something/somestring In ...

Regular Expression: Capturing data from a web address

Can anyone help me figure out how to extract the image ID from this URL: http://ecx.images-amazon.com/images/I/41zdz1zsG9L.SR38,50.jpg? I only need the part before the dot (41zdz1zsG9L). Any suggestions on how to achieve this using regular expressions? T ...

PHP Print every section of a URL using recursion

Can someone help me with creating a recursive function in PHP for dividing and printing all the states of a URL separated by '/'? For example, if we have a base URL like , how can we recursively print out each state of a URL after it has been sp ...

What causes a URL to function in a browser but fail when using the requests get method?

Whilst conducting tests, I stumbled upon a curious phenomenon: url = ' http://wi312.rockdizfile.com/d/uclf2kr7fp4r2ge47pcuihdpky2chcsjur5nrds2hx53f26qgxnrktew/Kimbra%20-%20Love%20in%20High%20Places.mp3' When this URL is entered into a browser, the file d ...

Discovering latitude and longitude coordinates from a map URL, then enhancing dynamism by utilizing the coordinates as parameters

Hello, I am currently learning Vue.js and have encountered a challenge with embedding Google Maps URLs. Despite my extensive research on Google, I have not been able to find the solution I need. Here is an example of the URL I am working with: "https: ...

What is the best way to connect a fresh post to a different URL in ReactJS and Redux?

Currently, I am working with Redux and ReactJS to develop a discussion platform. One of the key features I am trying to implement is where users can input the title and content of their post, which will then be submitted to create a new post. After submit ...

Extract the last word from the URL and remove any unnecessary components

Big shoutout to the amazing individuals who have provided assistance on another thread: Retrieve final word from URL following a forward slash in PHP Now, I am encountering a new dilemma. How can I accomplish this task in PHP: If $last_word also contai ...

Retrieve information from the existing URL and utilize it as a parameter in an ajax request

Currently, I am working on a website with only one HTML page. The main functionality involves fetching the URL to extract an ID and then sending it to an API using an AJAX call. Upon success, the data related to the extracted ID is displayed on the page. H ...

Automatically generated bizarre URL parameters

Something strange is happening all of a sudden. I've noticed unusual URL parameters appearing on the site, and I'm not sure where they are coming from in my code. https://i.stack.imgur.com/g1xGG.png I am using Webpack 4 and Vue. This issue is ...

What is the best way to conceal content within a URL while still transmitting it to the server using node.js and express?

I have been trying to figure out how to hide certain content from the URL, but still need to send that information to the server in my Express app. So far, I haven't found any solutions that work. For example, if I have a URL like www.abc.com/viewblo ...

Obtaining URL parameters through AJAX results in an empty value

How can I extract a URL parameter from a rewritten URL using .htaccess? I am currently using this function, but it keeps returning NULL: $.urlParam = function(name){ var results = new RegExp('[?&]' + name + '=([^&#]*)').exec(window.location.href ...

Tips for obtaining a redirect URL using Angular5

After receiving a temporary URL from a JSON server, I found out that it redirects to a permanent URL. My goal is to capture and store this redirect (permanent) URL in my database. Do you think this can be achieved with Angular 5? ...

Is there a way to determine whether data is present in a URL or not?

I'm struggling to figure out how to determine if the data is present in the URL using the code I've written. Can someone offer some guidance on how to solve this issue? Note: The code stops running when it reaches the second condition of the loo ...

Eliminating .php from the URL and the GET request

After implementing .htaccess, I successfully transformed the URL: http://www.websitename.co.uk/directory/users.php?id=idValue&data2=data2Value Into http://www.websitename.co.uk/directory/users?id=idValue&data2=data2Value HTAccess: RewriteE ...

Is there a way for me to determine the necessary URL for initiating my Get request?

I've been attempting a GET request to the endpoint /wp-json/wc/v3/products in order to test my WooCommerce API connection with POSTMAN. Unfortunately, I keep receiving a 404 error. I'm currently working on localhost, with WordPress running on por ...

Transferring information to the specified link using AJAX and PHP

I'm having trouble sending data to a link that I click on. Whenever I try, I just end up with an undefined index error in my PHP file. <a href="output.php"> Click me </a> ('a').click(function(){ href = "output.php"; ...

Transforming identification to forward slash in .htaccess

Could you assist me in rewriting the URL id from www.website.com/script/?id=3 to www.website.com/script/3/? This essentially means removing the "?id=" part. Below is the code in my .htaccess file: RewriteEngine on RewriteRule ^script/([^/\.]+)/?$ s ...

Is there a way to change the domain for all relative URLs on an HTML page to a different one that is not its current domain, including in HTML elements and JavaScript HTTP Requests?

I am dealing with a situation where my page contains "domain relative URLs" like ../file/foo or /file/foo within a href attributes, img src attributes, video, audio, web components, js ajax calls, etc. The issue arises when these URLs need to be relative ...

What is the best way to incorporate search parameters within a path in NextJS?

I am currently working on a project where the user is required to select a form and will be redirected to the appropriate form page. The folder structure I am using is as follows: patients/[patientId]/forms/type1/[type1Code] patients/[patientId]/forms/t ...

How can I append a hash to a URL using JavaScript without causing the page to scroll?

Is it possible to add a hash to the URL without scrolling the page using JavaScript? I navigate to the page I scroll down I click on a link that adds a hash (for example: http://www.example.com/#test) The page should not scroll back to the top. What is ...

Is there a way to verify the presence of a link using Selenium IDE?

Looking for assistance with creating a test case in Selenium IDE as a new user. The test case should take the URL of the Home page as input and run tests repeatedly to check for the presence of all links on both the Home page and all inner pages. ...

Which specific file is being requested when a forward slash (/) is placed immediately after the website URL?

Is it just me being clueless, or is there something unusual about this URL format? I've come across URLs like http://www.example.com/?p=1 quite often and I'm curious to know what exactly is being accessed by it. I usually use URLs such as http:// ...

Failed Ajax request is caused by an incorrect URL

In my current project using Ajax, I encountered a peculiar issue. The main page, Main.html, is accessible locally at 'http://localhost/Main.html', and it is styled with Bootstrap. Upon loading the page, jQuery verifies the existence of a particu ...

Developing uniform resource locators with jQuery

As I work on developing my webapp, I have made use of the tag in my JSPs to ensure that all links within the application - whether they lead to pages or resources like images and CSS - always stem from the root directory rather than being relative to the ...

Generate a customizable URL for my search bar

I have developed a single HTML page with full AJAX functionality, displaying all content including form submits, main page, form results, and more through various DOM manipulations. The issue I am currently encountering is related to a search box where use ...

Having issues with parameterized URL integration between Django2 and Angular2

I am encountering an issue with integrating a URL containing parameters in Angular and Django. When making a call to the url, Django expects a slash at the end while Angular appends a question mark before the parameters. How can this be resolved? Below is ...

I'm currently attempting to find a specific string within a URL

I want to utilize jQuery to search for a specific string that is appended to the end of the page URL after a user submits a form. Here's an example of what the URL might look like: https://somerandomsite.com/?page_id=1423#wpcf7-f1448-p1423-o1 The only c ...

Initiating the form with a query mark

Recently, I found myself in a disagreement with a colleague over the validity of a certain URL: <form action="?foo=bar" method="get"> According to him, using this URL can lead to troubles as the browser may struggle to correctly redirect to the int ...

Streamlining Website Traffic Through Automation

I am seeking ways to increase the views on my website using only my Mac computer. I am open to all suggestions and options available. If necessary, I can provide more details to clarify my question further. Initially, I am aiming for a rise in basic hits ...

Activate Bootstrap tab form with the ability to include sub tabs for added functionality

I have been working on a method to open Bootstrap 3 tabs on my pages based on the URL. For example, if the URL is myurl.com#tab1 (it will open the tab with id #tab1). Here's the code I am using: $(function () { var hash = window.location.hash; ...

PHP - Building URLs on the Fly

I have a link to a live video stream available. http://xxx.xxx.xxx.xxx:xxx/live/stream.m3u8 In order to enhance security and privacy, I am looking to create a dynamic link that constantly changes. To achieve this, some suggestions include generating a un ...

Extracting information from a website link using Python

Can anyone help me create a HTTP link using information from a database, such as IP and port number? I have tried the following code but keep encountering an error while parsing. Any assistance will be greatly appreciated. @app.route('/link_test/<str ...

Various web browsers may exhibit varying behaviors when processing extremely lengthy hyperlinks

I am curious to understand why browsers handle long URLs differently based on how they are accessed. Let me explain further: Within my application, there is a link to a specific view that may have a URL exceeding 2000 characters in length. I am aware that ...

Utilizing jQuery to make AJAX requests to multiple URLs

I am experiencing some difficulty running an Ajax call due to complications in locating the script.php file within my folder. This issue is a result of the RewriteRule in my htaccess file, which changes the formatting of URLs from "domain.com/index.php?bla ...

When the Github page URL is deployed, it redirects to the homepage, although it functions properly when executed locally

My react-app portfolio is live on github pages at this link: An issue arises when I click on the icon for a specific project: Projects Page Instead of opening the correct webpage, it redirects to the wrong URL shown here: Portfolio WebPage I want t ...

Acquiring the source or domain name in Next.js

Is there a way to retrieve the origin in Next.js without using window.location.origin? The useRouter().asPath method provides the relative pathname, but how can I access the origin URL like https://www.google.com? The Next.js Router docs do not provide in ...

Optimal Usage of URLs in WordPress Style Sheets

I've been doing extensive research on the pros and cons of using relative versus absolute paths for images in my CSS. After perusing this online discussion, I am leaning towards utilizing absolute paths. My primary concern is not so much about cross-domain ...

Trouble with Nextjs link not functioning properly with a URL object when incorporating element id into the pathname

Recently I added translations to my website, which means I now need to use a URL object when creating links. Everything has been going smoothly with this change except for one issue: when I try to click a link that points to /#contact. When simply using h ...

Python script utilizing curl to make requests to a URL through an API

As a novice Python scripter, I encountered a challenge when trying to integrate a link shortening service. The API documentation provided by the service is in JSON format and requires URL calls using curl. Due to my limited experience, I struggled with i ...

Verifying WordPress slug existence using AJAX

I want to verify if a slug URL already exists using the user interface. My initial idea was to use an AJAX solution similar to this. `jQuery("#slugBrut").keyup(function() { var slugBrutText = jQuery("#slugBrut").val() ; ...

Tips for extracting parameters from a URL using Express JS in a custom manner

Recently, I set up a server using the express package and encountered an issue while trying to extract parameters from the URL in a specific format. The URL structure is as follows: (notice there's no '?' indicating parameters). I am looking for a way to ...

I am unable to display images in my Full screen Activity when I receive them from my JSON response, even when swiping

How can I implement swipe functionality for full screen images within a GridView while loading the images from a JSON response? I am new to Android and seeking guidance from my friends. I want to achieve this using only one JSON URL in my program, where I ...

Determining if a URL is a subdomain URL using PHP

I created a function to check whether a URL is a subdomain URL or not. <?php header("Content-Type: text/plain"); function checkSubDomain($url) { $url = parse_url($url)["host"]; if(strstr($url,'.',true)=='www') { ...

What is the process for obtaining the indirect link of a Google search result?

I am looking to obtain the indirect link of a Google search result. After performing a search on Google, if I right-click on the result link, it changes to something like this: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&am ...

What is the proper way to structure a URL in JSON output?

When utilizing JSON output in my project, I encountered the following result: {"short_url":"http://urlhere/fb/37xzk"} However, the desired output should be formatted as follows: { "short_url":"http: //urlhere/fb/37xzk" } ...

I am having trouble passing a variable into the AJAX URL using JavaScript

Currently, I am attempting to remove an item from mongodb. However, I am encountering difficulty passing the id into the URL through the ajax call. Below is my code: $(".delete-item").on('click', function(e, id) { var deleteName = ...

Obtain the initial URL when initializing an Angular application

In the process of creating an Angular application for a landing page of a SaaS platform, the SaaS redirects to the Angular app using the URL http://localhost:4200/token=<token>. Shortly after, Angular switches to the home component at http://localhos ...

Parameters in the URL come before the actual domain

I have a query regarding the placement of parameters and queries in URLs. Typically, routes are defined after the domain like this: http://example.com/yourRoute However, I am using ExpressJS and would like to know if it's possible to store parameters bef ...